org.appfuse.service
Class MailEngine
java.lang.Object
org.appfuse.service.MailEngine
public class MailEngine
- extends java.lang.Object
Class for sending e-mail messages based on Velocity templates
or with attachments.
- Author:
- Matt Raible
|
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
|
Method Summary |
void |
send(org.springframework.mail.SimpleMailMessage msg)
Send a simple message with pre-populated values. |
void |
sendMessage(org.springframework.mail.SimpleMailMessage msg,
java.lang.String templateName,
java.util.Map model)
Send a simple message based on a Velocity template. |
void |
sendMessage(java.lang.String[] recipients,
java.lang.String sender,
org.springframework.core.io.ClassPathResource resource,
java.lang.String bodyText,
java.lang.String subject,
java.lang.String attachmentName)
Convenience method for sending messages with attachments. |
void |
setMailSender(org.springframework.mail.MailSender mailSender)
|
void |
setVelocityEngine(org.apache.velocity.app.VelocityEngine velocityEngine)
|
| 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(org.springframework.mail.MailSender mailSender)
setVelocityEngine
public void setVelocityEngine(org.apache.velocity.app.VelocityEngine velocityEngine)
sendMessage
public void sendMessage(org.springframework.mail.SimpleMailMessage msg,
java.lang.String templateName,
java.util.Map model)
- Send a simple message based on a Velocity template.
- Parameters:
msg - templateName - model -
send
public void send(org.springframework.mail.SimpleMailMessage msg)
- Send a simple message with pre-populated values.
- Parameters:
msg -
sendMessage
public void sendMessage(java.lang.String[] recipients,
java.lang.String sender,
org.springframework.core.io.ClassPathResource resource,
java.lang.String bodyText,
java.lang.String subject,
java.lang.String attachmentName)
throws javax.mail.MessagingException
- Convenience method for sending messages with attachments.
- Parameters:
recipients - sender - resource - bodyText - subject - attachmentName -
- Throws:
javax.mail.MessagingException
Copyright © 2003-2007. All Rights Reserved.