org.appfuse.service
Class MailEngine
java.lang.Object
org.appfuse.service.MailEngine
public class MailEngine
- extends Object
Class for sending e-mail messages based on Velocity templates
or with attachments.
View Source
- Author:
- Matt Raible
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
MailEngine
public MailEngine()
setMailSender
public void setMailSender(MailSender mailSender)
setVelocityEngine
public void setVelocityEngine(org.apache.velocity.app.VelocityEngine velocityEngine)
sendMessage
public void sendMessage(SimpleMailMessage msg,
String templateName,
Map model)
- Send a simple message based on a Velocity template.
- Parameters:
msg
- templateName
- model
-
send
public void send(SimpleMailMessage msg)
- Send a simple message with pre-populated values.
- Parameters:
msg
-
sendMessage
public void sendMessage(String[] emailAddresses,
ClassPathResource resource,
String bodyText,
String subject,
String attachmentName)
throws MessagingException
- Convenience method for sending messages with attachments.
- Parameters:
emailAddresses
- resource
- bodyText
- subject
- attachmentName
-
- Throws:
MessagingException
Copyright � 2002-2006