public class SimpleMailer extends AbstractMailer
AbstractMailer.Configuration| Constructor and Description |
|---|
SimpleMailer() |
SimpleMailer(String from) |
| Modifier and Type | Method and Description |
|---|---|
void |
attachFile(String[] files) |
protected javax.mail.internet.MimeMessage |
buildMessage(Collection<String> to,
Collection<String> ccs,
Collection<String> bccs,
Map<String,String> headers,
String subject,
String body) |
protected boolean |
isValidMailerConfiguration(Properties config)
Checks if any implementation specific mailer configurations are incorrect
|
void |
send(Collection<String> to,
Collection<String> ccs,
Collection<String> bccs,
Map<String,String> headers,
String subject,
String body)
Sends an email
|
void |
send(Collection<String> to,
Collection<String> ccs,
Collection<String> bccs,
String subject,
String body)
Sends an email
|
void |
send(javax.mail.internet.MimeMessage message)
Sends an email
|
void |
send(String to,
Map<String,String> headers,
String subject,
String body)
Sends an email
|
void |
send(String to,
String subject,
String body)
Sends an email
|
configure, configure, convertStringsToAddressess, convertStringToAddress, getConfiguration, getConfigurationProperty, getConfigurationProperty, getDebugAddress, getList, isDebug, isValidBasicConfiguration, isValidConfiguration, isValidEmailpublic SimpleMailer()
public SimpleMailer(String from)
protected boolean isValidMailerConfiguration(Properties config)
AbstractMailerisValidMailerConfiguration in class AbstractMailerconfig - the configuration propertiespublic void send(String to, String subject, String body) throws MailerException
AbstractMailersend in class AbstractMailerto - The destination emailsubject - the message subjectbody - The message bodyMailerException - some problem with the argumentspublic void send(String to, Map<String,String> headers, String subject, String body) throws MailerException
AbstractMailersend in class AbstractMailerto - The destination emailheaders - A map with any header values to be added or overriddensubject - the message subjectbody - The message bodyMailerException - some problem with the argumentspublic void send(Collection<String> to, Collection<String> ccs, Collection<String> bccs, String subject, String body) throws MailerException
AbstractMailersend in class AbstractMailerto - The destination emailccs - Carbon copy addressesbccs - Carbon copy addressessubject - the message subjectbody - The message bodyMailerException - some problem with the argumentspublic void send(Collection<String> to, Collection<String> ccs, Collection<String> bccs, Map<String,String> headers, String subject, String body) throws MailerException
AbstractMailersend in class AbstractMailerto - The destination emailccs - Carbon copy addressesbccs - Carbon copy addressesheaders - A map with any header values to be added or overriddensubject - the message subjectbody - The message bodyMailerException - some problem with the argumentspublic void send(javax.mail.internet.MimeMessage message)
throws MailerException
AbstractMailersend in class AbstractMailermessage - The Mime message object to be sentMailerException - some problem with the argumentsprotected javax.mail.internet.MimeMessage buildMessage(Collection<String> to, Collection<String> ccs, Collection<String> bccs, Map<String,String> headers, String subject, String body) throws MailerException
MailerExceptionpublic void attachFile(String[] files)
Copyright © 2014–2015 Premium Minds. All rights reserved.