error sending tickets to otrs

This commit is contained in:
Peter Hormanns 2013-05-24 16:27:13 +02:00
parent 9b8db6acd7
commit f52ab72b7a

View File

@ -27,6 +27,9 @@ public class SmtpHelper {
SMTPClient client = new SMTPClient(); SMTPClient client = new SMTPClient();
String canonicalHostName = InetAddress.getLocalHost().getHostName(); String canonicalHostName = InetAddress.getLocalHost().getHostName();
String smtpHost = Config.getInstance().getProperty("smtp.host"); String smtpHost = Config.getInstance().getProperty("smtp.host");
if (smtpHost == null || smtpHost.trim().isEmpty()) {
smtpHost = "localhost";
}
if ("unittest".equals(smtpHost)) { // Nur fuer Unit-Tests if ("unittest".equals(smtpHost)) { // Nur fuer Unit-Tests
if (subject.toLowerCase().contains("error")) { if (subject.toLowerCase().contains("error")) {
throw new HSAdminException("Konnte Mail nicht senden"); throw new HSAdminException("Konnte Mail nicht senden");