public class EmailGenerator extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BODY |
static String |
CC |
static String |
DATE |
static String |
EMAIL_LOG |
static String |
FROM |
static String |
HTML_EMAIL |
static int |
HTML_TYPE |
static String |
MAIL_HOST |
static int |
PROJECT_ID |
static String |
SMTP |
static String |
SUBJECT |
static String |
TEXT_EMAIL |
static int |
TEXT_TYPE |
static String |
TO |
Modifier and Type | Method and Description |
---|---|
static void |
sendHTMLMail(String recipient,
String subject,
String message,
String from)
Send HTML email to an individual
|
static void |
sendHTMLMailWithLog(String recipient,
String subject,
String message,
String from,
String logFile)
Send text email to an individual also log the email info in a log file
with a properties format.
|
static void |
sendTextMail(String recipient,
String subject,
String message,
String from)
Send Text email to an individual
|
static void |
sendTextMailWithLog(String recipient,
String subject,
String message,
String from,
String logFile)
Send text email to an individual also log the email info in a log file
with a properties format.
|
public static final String SMTP
public static final String MAIL_HOST
public static final String TEXT_EMAIL
public static final String HTML_EMAIL
public static final int TEXT_TYPE
public static final int HTML_TYPE
public static final String DATE
public static final String FROM
public static final String TO
public static final String CC
public static final String SUBJECT
public static final String BODY
public static final String EMAIL_LOG
public static final int PROJECT_ID
public static void sendTextMail(String recipient, String subject, String message, String from) throws javax.mail.MessagingException
from
- The sender's emailrecipient
- The intended recipient of the messagesubject
- The subject of the messagemessage
- The body of the messagejavax.mail.MessagingException
public static void sendTextMailWithLog(String recipient, String subject, String message, String from, String logFile) throws javax.mail.MessagingException
from
- The sender's emailrecipient
- The intended recipient of the messagesubject
- The subject of the messagemessage
- The body of the message(the HTML part)LogFile
- Property file where the email will be loggedjavax.mail.MessagingException
public static void sendHTMLMail(String recipient, String subject, String message, String from) throws javax.mail.MessagingException
from
- The sender's emailrecipient
- The intended recipient of the messagesubject
- The subject of the messagemessage
- The body of the messagejavax.mail.MessagingException
public static void sendHTMLMailWithLog(String recipient, String subject, String message, String from, String logFile) throws javax.mail.MessagingException
from
- The sender's emailrecipient
- The intended recipient of the messagesubject
- The subject of the messagemessage
- The body of the message(the HTML part)LogFile
- Property file where the email will be loggedjavax.mail.MessagingException
Copyright © 2016. All rights reserved.