nl.surfnet.coin.shared.service
Class ErrorMessageMailer

java.lang.Object
  extended by nl.surfnet.coin.shared.service.ErrorMessageMailer

public class ErrorMessageMailer
extends Object

Utility class to send error mails safely (should never throw any errors)


Field Summary
static String DATE_FORMAT
           
static String MAIL_TEMPLATE
           
static String TIME_FORMAT
           
 
Constructor Summary
ErrorMessageMailer()
           
 
Method Summary
 boolean sendErrorMail(ErrorMail errorMail)
          Sends the error message by mail.
 void setErrorMailTo(String errorMailTo)
          Setter for the mailto address (injected by Spring)
 void setMailSender(org.springframework.mail.javamail.JavaMailSender mailSender)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAIL_TEMPLATE

public static final String MAIL_TEMPLATE
See Also:
Constant Field Values

DATE_FORMAT

public static final String DATE_FORMAT
See Also:
Constant Field Values

TIME_FORMAT

public static final String TIME_FORMAT
See Also:
Constant Field Values
Constructor Detail

ErrorMessageMailer

public ErrorMessageMailer()
Method Detail

sendErrorMail

public boolean sendErrorMail(ErrorMail errorMail)
Sends the error message by mail.

Parameters:
errorMail - the ErrorMail object containing error mail properties
Returns:
true if the mail was offered to the SMTP server, otherwise false

setMailSender

public void setMailSender(org.springframework.mail.javamail.JavaMailSender mailSender)

setErrorMailTo

public void setErrorMailTo(String errorMailTo)
Setter for the mailto address (injected by Spring)

Parameters:
errorMailTo - mailto address to set


Copyright © 2009-2013 SURFnet bv, The Netherlands. All Rights Reserved.