From f52ab72b7ae944f366c8dc5a86fc8f25bc8da839 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
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 files changed, 3 insertions(+), 0 deletions(-)

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 @@
 			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");

--
Gitblit v1.9.1