public class EmailServer extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
EmailServer.EmailLoader |
static class |
EmailServer.VelocityEmailLoader |
| Modifier and Type | Field and Description |
|---|---|
static javax.mail.Message |
lastMockSentItem |
| Constructor and Description |
|---|
EmailServer(String smtpServer,
EmailServer.EmailLoader loader,
String[] to,
String from) |
EmailServer(String smtpServer,
String velocityTemplate,
ParseCall parser,
ContextAware contextAware,
String[] to,
String from) |
EmailServer(String smtpServer,
String velocityTemplate,
ParseCall parser,
ContextAware contextAware,
String to,
String from) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBCC(String email) |
static void |
addExcelFile(EmailServer email,
String excelFileContent,
String fileName) |
void |
addHTMLImage(String file,
String url) |
void |
addHTMLImage(String url,
String fileName,
InputStream inputStream) |
void |
addPart(javax.mail.internet.MimeBodyPart part) |
void |
addTo(String email) |
void |
clearBCC() |
void |
clearTo() |
static javax.mail.Message |
getLastSentItem() |
static boolean |
isEmailValid(String email) |
void |
send() |
void |
send(boolean useGoogle,
String user,
String pass) |
void |
setEmailHtmlBody(String emailHtmlBody) |
void |
setEmailSubject(String emailSubject) |
void |
setEmailTextBody(String emailTextBody) |
static void |
setMockTransport(boolean mockTransport) |
public EmailServer(String smtpServer, String velocityTemplate, ParseCall parser, ContextAware contextAware, String to, String from)
public EmailServer(String smtpServer, String velocityTemplate, ParseCall parser, ContextAware contextAware, String[] to, String from)
public EmailServer(String smtpServer, EmailServer.EmailLoader loader, String[] to, String from)
public static void setMockTransport(boolean mockTransport)
public static javax.mail.Message getLastSentItem()
public static boolean isEmailValid(String email)
public void addTo(String email)
public void clearTo()
public void addBCC(String email)
public void clearBCC()
public void send(boolean useGoogle,
String user,
String pass)
throws Exception
Exceptionpublic void addPart(javax.mail.internet.MimeBodyPart part)
public static void addExcelFile(EmailServer email, String excelFileContent, String fileName) throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic void addHTMLImage(String file, String url) throws FileNotFoundException, javax.mail.MessagingException
FileNotFoundExceptionjavax.mail.MessagingExceptionpublic void addHTMLImage(String url, String fileName, InputStream inputStream) throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic void setEmailHtmlBody(String emailHtmlBody)
public void setEmailSubject(String emailSubject)
public void setEmailTextBody(String emailTextBody)
Copyright © 2018. All rights reserved.