| Constructor and Description |
|---|
SendEmail()
The Constructor.
|
SendEmail(Properties properties)
The Constructor.
|
SendEmail(Properties properties,
javax.mail.Authenticator authenticator)
The Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
javax.mail.Authenticator |
getAuthenticator() |
javax.mail.Session |
getSession()
Gets the Session-object.
|
String |
sendEmail(String to,
String from,
String subject,
String message)
Sends a simple plain text email.
|
String |
sendEmailMessage(EmailMessage emailMessage)
Sends the given EmailMessage.
|
Collection<String> |
sendEmailMessages(Collection<EmailMessage> emailMessages)
Send email messages.
|
Collection<String> |
sendEmailMessagesWithAtachments(Collection<EmailMessageWithAttachments> emailAttachments)
Send email messages with atachments.
|
String |
sendEmailMessageWithAttachments(EmailMessageWithAttachments emailAttachments)
Sends the EmailMessage thats wrappes from the EmailMessagWithAttachments.
|
void |
setAuthenticator(javax.mail.Authenticator authenticator) |
void |
setDebug(boolean debug)
Sets the debug flag.
|
public SendEmail()
public SendEmail(Properties properties)
properties - the propertiespublic SendEmail(Properties properties, javax.mail.Authenticator authenticator)
properties - the propertiesauthenticator - the authenticatorpublic javax.mail.Authenticator getAuthenticator()
public javax.mail.Session getSession()
public String sendEmail(String to, String from, String subject, String message) throws javax.mail.internet.AddressException, UnsupportedEncodingException, javax.mail.MessagingException
sendEmail in interface SendMailto - The to Address.from - The from Address.subject - The subject from the email.message - The Message from the email.javax.mail.internet.AddressException - the address exceptionUnsupportedEncodingException - if an error occurs by encoding.javax.mail.MessagingException - if an error occurs by sending the message.public String sendEmailMessage(EmailMessage emailMessage) throws javax.mail.MessagingException
sendEmailMessage in interface SendMailemailMessage - The EmailMessage to send.javax.mail.MessagingException - if an error occurs.public Collection<String> sendEmailMessages(Collection<EmailMessage> emailMessages) throws javax.mail.MessagingException
sendEmailMessages in interface SendMailemailMessages - the email messagesjavax.mail.MessagingException - the messaging exceptionpublic Collection<String> sendEmailMessagesWithAtachments(Collection<EmailMessageWithAttachments> emailAttachments) throws javax.mail.MessagingException
sendEmailMessagesWithAtachments in interface SendMailemailAttachments - the email attachmentsjavax.mail.MessagingException - if an error occurs.public String sendEmailMessageWithAttachments(EmailMessageWithAttachments emailAttachments) throws javax.mail.MessagingException
sendEmailMessageWithAttachments in interface SendMailemailAttachments - The EmailAttachments who wrappes the EmailMessage.javax.mail.MessagingException - if an error occurs.public void setAuthenticator(javax.mail.Authenticator authenticator)
Copyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.