public class MessageMailer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
smtpHost |
Constructor and Description |
---|
MessageMailer(java.lang.String to,
java.lang.String from,
java.lang.String subject) |
Modifier and Type | Method and Description |
---|---|
static javax.mail.internet.InternetAddress |
getMailAddress(java.lang.String address) |
static void |
main(java.lang.String[] args) |
void |
send(java.lang.String text) |
void |
send(java.lang.String text,
javax.mail.internet.InternetAddress[] recipients) |
void |
send(java.lang.String subject,
java.lang.String text) |
void |
send(java.lang.String subject,
java.lang.String text,
javax.mail.internet.InternetAddress[] recipients) |
void |
send(java.lang.String subject,
java.lang.String text,
java.lang.String[] recipients) |
static void |
setSMTPHost(java.lang.String mailHost) |
void |
setSubject(java.lang.String subject)
this is used to reset the default subject only, not MT-Safe
|
public MessageMailer(java.lang.String to, java.lang.String from, java.lang.String subject)
public void send(java.lang.String text) throws javax.mail.MessagingException
javax.mail.MessagingException
public void send(java.lang.String subject, java.lang.String text) throws javax.mail.MessagingException
javax.mail.MessagingException
public void send(java.lang.String subject, java.lang.String text, java.lang.String[] recipients) throws javax.mail.MessagingException
javax.mail.MessagingException
public void send(java.lang.String text, javax.mail.internet.InternetAddress[] recipients) throws javax.mail.MessagingException
javax.mail.MessagingException
public void send(java.lang.String subject, java.lang.String text, javax.mail.internet.InternetAddress[] recipients) throws javax.mail.MessagingException
javax.mail.MessagingException
public static javax.mail.internet.InternetAddress getMailAddress(java.lang.String address)
public void setSubject(java.lang.String subject)
public static void setSMTPHost(java.lang.String mailHost)
public static void main(java.lang.String[] args)