public class EmailSender extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_EMAIL |
static String |
CONFIG_SECRET |
| Constructor and Description |
|---|
EmailSender() |
| Modifier and Type | Method and Description |
|---|---|
void |
sendMail(String to,
String subject,
String content)
Send email with a string content.
|
void |
sendMailWithAttachment(String to,
String subject,
String content,
String filename)
Send email with a string content and attachment
|
public static final String CONFIG_EMAIL
public static final String CONFIG_SECRET
public void sendMail(String to, String subject, String content) throws javax.mail.MessagingException
to - destination email addresssubject - email subjectcontent - email contentjavax.mail.MessagingException - message exceptionpublic void sendMailWithAttachment(String to, String subject, String content, String filename) throws javax.mail.MessagingException
to - destination eamil addresssubject - email subjectcontent - email contentfilename - attachment filenamejavax.mail.MessagingException - messaging exceptionCopyright © 2019. All rights reserved.