[Schmitzm-commits] r2168 - in trunk/schmitzm-core/src/main/java/de/schmitzm: io net/mail
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Thu Dec 13 11:22:09 CET 2012
Author: alfonx
Date: 2012-12-13 11:22:08 +0100 (Thu, 13 Dec 2012)
New Revision: 2168
Modified:
trunk/schmitzm-core/src/main/java/de/schmitzm/io/MailerInterface.java
trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/MailUtil.java
trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/Mailer.java
Log:
A20 knallt mails jetzt in korrektem HTML?
Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/io/MailerInterface.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/io/MailerInterface.java 2012-12-09 02:57:44 UTC (rev 2167)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/io/MailerInterface.java 2012-12-13 10:22:08 UTC (rev 2168)
@@ -8,6 +8,8 @@
public interface MailerInterface {
void sendMail(String recipientsAddress, String subject, String text) throws AddressException, MessagingException;
+
+ void sendMail(String recipientsAddress, String subject, String text, boolean html) throws AddressException, MessagingException;
void sendMail(String mailDestAddr, Throwable error,
Set<Object> additionalInfo) throws AddressException, MessagingException;
Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/MailUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/MailUtil.java 2012-12-09 02:57:44 UTC (rev 2167)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/MailUtil.java 2012-12-13 10:22:08 UTC (rev 2168)
@@ -396,7 +396,7 @@
String mailSubject = "Exception-Report: " + exceptionMess;
if (smtpMailer != null)
- smtpMailer.sendMail(mailDestAddr, mailSubject, mailBody.toString());
+ smtpMailer.sendMail(mailDestAddr, mailSubject, mailBody.toString(), false);
else
sendDesktopMail(mailDestAddr, mailSubject, mailBody.toString());
}
Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/Mailer.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/Mailer.java 2012-12-09 02:57:44 UTC (rev 2167)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/net/mail/Mailer.java 2012-12-13 10:22:08 UTC (rev 2168)
@@ -26,26 +26,39 @@
this.mailSenderAddress = mailSenderAddress;
}
+ /**
+ * Default ist hier weiterhin kein HTML zu verwenden
+ */
@Override
public void sendMail(final String recipientsAddress, final String subject,
final String text) throws AddressException, MessagingException {
try {
MailUtil.sendSmtpMail(recipientsAddress, subject, text, smtpUser,
- smtpCredential, smtpAuth, smtpHost, mailSenderAddress, true);
+ smtpCredential, smtpAuth, smtpHost, mailSenderAddress, false);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
+ /**
+ *
+ */
@Override
+ public void sendMail(final String recipientsAddress, final String subject,
+ final String text, boolean html) throws AddressException, MessagingException {
+ try {
+ MailUtil.sendSmtpMail(recipientsAddress, subject, text, smtpUser,
+ smtpCredential, smtpAuth, smtpHost, mailSenderAddress, html);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @Override
public void sendMail(String mailDestAddr, Throwable error,
Set<Object> additionalInfo) throws AddressException, MessagingException {
-// try {
- MailUtil.sendExceptionMail(mailDestAddr, error, additionalInfo,
- this);
-// } catch (Exception e) {
-// throw new RuntimeException(e);
-// }
+ MailUtil.sendExceptionMail(mailDestAddr, error, additionalInfo,
+ this);
}
}
More information about the Schmitzm-commits
mailing list