public class SimpleMailer extends Object
Constructor and Description |
---|
SimpleMailer(String host,
String sender)
Constructor.
|
SimpleMailer(String host,
String sender,
String contentType)
Constructor.
|
SimpleMailer(String host,
String sender,
String[] recipients)
Constructor.
|
SimpleMailer(String host,
String sender,
String[] recipients,
String contentType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
send(String[] recipients,
String subject,
String body)
Sends an email.
|
void |
send(String subject,
String body)
Sends an email.
|
void |
send(String recipient,
String subject,
String body)
Sends an email.
|
public SimpleMailer(String host, String sender)
host
- mail server hostsender
- email address of sender ("From" field)public SimpleMailer(String host, String sender, String[] recipients)
host
- mail server hostsender
- email address of sender ("From" field)recipients
- email address of recipients ("To" field)public SimpleMailer(String host, String sender, String contentType)
host
- mail server hostsender
- email address of sender ("From" field)contentType
- content type of the email messagepublic SimpleMailer(String host, String sender, String[] recipients, String contentType)
host
- mail server hostsender
- email address of sender ("From" field)recipients
- email address of recipients ("To" field)contentType
- content type of the email messagepublic final void send(String subject, String body) throws javax.mail.MessagingException
subject
- email subjectbody
- email body (content)javax.mail.MessagingException
- problem sending emailpublic final void send(String recipient, String subject, String body) throws javax.mail.MessagingException
recipient
- email recipient ("To" field)subject
- email subjectbody
- email body (content)javax.mail.MessagingException
- problem sending emailCopyright © 2007–2021 Norconex Inc.. All rights reserved.