From f52ab72b7ae944f366c8dc5a86fc8f25bc8da839 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Fri, 24 May 2013 16:27:13 +0200 Subject: [PATCH] error sending tickets to otrs --- hsarback/src/de/hsadmin/core/qserv/SmtpHelper.java | 3 +++ 1 file changed, 3 insertions(+) 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");