| Constructor and Description |
|---|
SendEmail()
The Constructor.
|
SendEmail(Properties properties)
The Constructor.
|
SendEmail(Properties properties,
Authenticator authenticator)
The Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Authenticator |
getAuthenticator() |
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(Authenticator authenticator) |
void |
setDebug(boolean debug)
Sets the debug flag.
|
public SendEmail()
public SendEmail(Properties properties)
properties - the propertiespublic SendEmail(Properties properties, Authenticator authenticator)
properties - the propertiesauthenticator - the authenticatorpublic Authenticator getAuthenticator()
public Session getSession()
public String sendEmail(String to, String from, String subject, String message) throws AddressException, UnsupportedEncodingException, MessagingException
sendEmail in interface SendMailto - The to Address.from - The from Address.subject - The subject from the email.message - The Message from the email.AddressException - the address exceptionUnsupportedEncodingException - if an error occurs by encoding.MessagingException - if an error occurs by sending the message.public String sendEmailMessage(EmailMessage emailMessage) throws MessagingException
sendEmailMessage in interface SendMailemailMessage - The EmailMessage to send.MessagingException - if an error occurs.public Collection<String> sendEmailMessages(Collection<EmailMessage> emailMessages) throws MessagingException
sendEmailMessages in interface SendMailemailMessages - the email messagesMessagingException - the messaging exceptionpublic Collection<String> sendEmailMessagesWithAtachments(Collection<EmailMessageWithAttachments> emailAttachments) throws MessagingException
sendEmailMessagesWithAtachments in interface SendMailemailAttachments - the email attachmentsMessagingException - if an error occurs.public String sendEmailMessageWithAttachments(EmailMessageWithAttachments emailAttachments) throws MessagingException
sendEmailMessageWithAttachments in interface SendMailemailAttachments - The EmailAttachments who wrappes the EmailMessage.MessagingException - if an error occurs.public void setAuthenticator(Authenticator authenticator)
Copyright © 2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.