diff --git a/hsarback/src/de/hsadmin/core/qserv/SmtpHelper.java b/hsarback/src/de/hsadmin/core/qserv/SmtpHelper.java index 83ba6c3..f363334 100644 --- a/hsarback/src/de/hsadmin/core/qserv/SmtpHelper.java +++ b/hsarback/src/de/hsadmin/core/qserv/SmtpHelper.java @@ -27,6 +27,9 @@ public class SmtpHelper { SMTPClient client = new SMTPClient(); String canonicalHostName = InetAddress.getLocalHost().getHostName(); String smtpHost = Config.getInstance().getProperty("smtp.host"); + if (smtpHost == null || smtpHost.trim().isEmpty()) { + smtpHost = "localhost"; + } if ("unittest".equals(smtpHost)) { // Nur fuer Unit-Tests if (subject.toLowerCase().contains("error")) { throw new HSAdminException("Konnte Mail nicht senden");