public class MailerImpl extends Object implements Mailer
Modifier and Type | Field and Description |
---|---|
protected org.apache.log4j.Logger |
LOG |
Constructor and Description |
---|
MailerImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
prepareHtmlMessage(String messageText,
javax.mail.Message message) |
void |
sendEmail(EmailFrom from,
EmailTo to,
EmailSubject subject,
EmailBody body,
boolean htmlMessage)
Send an email to a single recipient with the specified subject and message.
|
void |
sendEmail(EmailFrom from,
EmailToList to,
EmailSubject subject,
EmailBody body,
EmailCcList cc,
EmailBcList bc,
boolean htmlMessage)
Send an email to the given "to", "cc", and "bcc" recipients with the specified subject and message.
|
void |
sendEmail(MailMessage message)
Construct and a send simple email message from a Mail Message.
|
protected void |
sendMessage(String from,
javax.mail.Address[] to,
String subject,
String messageBody,
javax.mail.Address[] cc,
javax.mail.Address[] bcc,
boolean htmlMessage)
Send an email to the given recipients with the specified subject and message.
|
void |
setMailSender(org.springframework.mail.javamail.JavaMailSenderImpl mailSender) |
protected final org.apache.log4j.Logger LOG
public MailerImpl()
public void setMailSender(org.springframework.mail.javamail.JavaMailSenderImpl mailSender)
mailSender
- The injected Mail Sender.public void sendEmail(MailMessage message) throws javax.mail.MessagingException
public void sendEmail(EmailFrom from, EmailTo to, EmailSubject subject, EmailBody body, boolean htmlMessage)
public void sendEmail(EmailFrom from, EmailToList to, EmailSubject subject, EmailBody body, EmailCcList cc, EmailBcList bc, boolean htmlMessage)
sendEmail
in interface Mailer
from
- sender of the messageto
- list of addresses to which the message is sentsubject
- subject of the messagebody
- body of the messagecc
- list of addresses which are to be cc'd on the messagebc
- list of addresses which are to be bcc'd on the messageprotected void sendMessage(String from, javax.mail.Address[] to, String subject, String messageBody, javax.mail.Address[] cc, javax.mail.Address[] bcc, boolean htmlMessage) throws javax.mail.internet.AddressException, javax.mail.MessagingException, org.springframework.mail.MailException
from
- sender of the messageto
- list of addresses to which the message is sentsubject
- subject of the messagemessageBody
- body of the messagecc
- list of addresses which are to be cc'd on the messagebcc
- list of addresses which are to be bcc'd on the messagejavax.mail.internet.AddressException
javax.mail.MessagingException
org.springframework.mail.MailException
protected void prepareHtmlMessage(String messageText, javax.mail.Message message) throws javax.mail.MessagingException
javax.mail.MessagingException
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.