|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.dif.utils.mail.MailSender
public class MailSender
The Class MailSender.
Field Summary | |
---|---|
protected static MailSender |
instance
The MailSender singleton instance |
Constructor Summary | |
---|---|
MailSender(IMailConfiguration configuration)
MailSender Constructor |
Method Summary | |
---|---|
IMailConfiguration |
getConfiguration()
Inspector for the 'configuration' attribute. |
static MailSender |
getInstance()
Inspector for the 'instance' attribute. |
boolean |
sendEmail(MailType type,
String from,
String to,
String cc,
String bcc,
String subject,
String body,
List<String> attachments,
Map<String,String> images)
Send an email. |
boolean |
sendEmail(MailType type,
String from,
String to,
String cc,
String bcc,
String subject,
String body,
List<String> attachments,
Map<String,String> images,
boolean disableErrorLog)
Send an email. |
boolean |
sendHTMLEmail(String to,
String cc,
String bcc,
String subject,
String body)
Send an HTML text email. |
boolean |
sendHTMLEmail(String to,
String cc,
String bcc,
String subject,
String body,
List<String> attachments,
Map<String,String> images)
Send an HTML text email. |
boolean |
sendHTMLEmail(String to,
String cc,
String bcc,
String subject,
String body,
String attachments,
String images)
Send an HTML text email. |
boolean |
sendHTMLEmailWithAttachements(String to,
String cc,
String bcc,
String subject,
String body,
List<String> attachments)
Send an HTML text email. |
boolean |
sendHTMLEmailWithAttachements(String to,
String cc,
String bcc,
String subject,
String body,
String attachments)
Send an HTML text email. |
boolean |
sendHTMLEmailWithImages(String to,
String cc,
String bcc,
String subject,
String body,
Map<String,String> images)
Send an HTML text email. |
boolean |
sendHTMLEmailWithImages(String to,
String cc,
String bcc,
String subject,
String body,
String images)
Send an HTML text email. |
boolean |
sendTextEmail(String to,
String cc,
String bcc,
String subject,
String body)
Send a plain text email. |
boolean |
sendTextEmail(String to,
String cc,
String bcc,
String subject,
String body,
List<String> attachments)
Send a plain text email. |
boolean |
sendTextEmail(String to,
String cc,
String bcc,
String subject,
String body,
String attachments)
Send a plain text email. |
static void |
setInstance(MailSender instance)
Modifier for the 'instance' attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static MailSender instance
Constructor Detail |
---|
public MailSender(IMailConfiguration configuration)
configuration
- the IMailConfiguration
Method Detail |
---|
public static MailSender getInstance()
public static void setInstance(MailSender instance)
instance
- the new instance value to setpublic IMailConfiguration getConfiguration()
public boolean sendEmail(MailType type, String from, String to, String cc, String bcc, String subject, String body, List<String> attachments, Map<String,String> images) throws javax.mail.internet.AddressException, javax.mail.MessagingException
type
- the mail typefrom
- the sender addressto
- the mail destination address field.cc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in HTMLattachments
- the mail attachments. Names will be server paths.images
- the html embedded images. Names will be server paths.
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendEmail(MailType type, String from, String to, String cc, String bcc, String subject, String body, List<String> attachments, Map<String,String> images, boolean disableErrorLog) throws javax.mail.MessagingException
type
- the mail typefrom
- the sender addressto
- the mail destination address field.cc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in HTMLattachments
- the mail attachments. Names will be server paths.images
- the html embedded images. Names will be server paths.disableErrorLog
-
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendHTMLEmail(String to, String cc, String bcc, String subject, String body) throws javax.mail.internet.AddressException, javax.mail.MessagingException
to
- the mail destination address fieldcc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in HTML
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendHTMLEmail(String to, String cc, String bcc, String subject, String body, List<String> attachments, Map<String,String> images) throws javax.mail.internet.AddressException, javax.mail.MessagingException
to
- the mail destination address fieldcc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in HTMLattachments
- the mail attachments. Names will be server paths.images
- the html embedded images. Names will be server paths.
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendHTMLEmail(String to, String cc, String bcc, String subject, String body, String attachments, String images) throws javax.mail.internet.AddressException, javax.mail.MessagingException
to
- the mail destination address fieldcc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in HTMLattachments
- the mail attachments. Names will be server paths and list should be comma separatedimages
- the html embedded images. Names will be server paths. Format is: "id=imagePath,id2=imagePath"
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendHTMLEmailWithAttachements(String to, String cc, String bcc, String subject, String body, List<String> attachments) throws javax.mail.internet.AddressException, javax.mail.MessagingException
to
- the mail destination address fieldcc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in HTMLattachments
- the mail attachments. Names will be server paths.
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendHTMLEmailWithAttachements(String to, String cc, String bcc, String subject, String body, String attachments) throws javax.mail.internet.AddressException, javax.mail.MessagingException
to
- the mail destination address fieldcc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in HTMLattachments
- the mail attachments. Names will be server paths and list should be comma separated
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendHTMLEmailWithImages(String to, String cc, String bcc, String subject, String body, Map<String,String> images) throws javax.mail.internet.AddressException, javax.mail.MessagingException
to
- the mail destination address fieldcc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in HTMLimages
- the html embedded images. Names will be server paths.
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendHTMLEmailWithImages(String to, String cc, String bcc, String subject, String body, String images) throws javax.mail.internet.AddressException, javax.mail.MessagingException
to
- the mail destination address fieldcc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in HTMLimages
- the html embedded images. Names will be server paths. Format is: "id=imagePath,id2=imagePath"
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendTextEmail(String to, String cc, String bcc, String subject, String body) throws javax.mail.internet.AddressException, javax.mail.MessagingException
to
- the mail destination address fieldcc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in plain text
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendTextEmail(String to, String cc, String bcc, String subject, String body, List<String> attachments) throws javax.mail.internet.AddressException, javax.mail.MessagingException
to
- the mail destination address fieldcc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in plain textattachments
- the mail attachments. Names will be server paths.
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the emailpublic boolean sendTextEmail(String to, String cc, String bcc, String subject, String body, String attachments) throws javax.mail.internet.AddressException, javax.mail.MessagingException
to
- the mail destination address fieldcc
- the mail CC address field.bcc
- the mail BCC address field.subject
- the mail subjectbody
- the mail body, in plain textattachments
- the mail attachments. Names will be server paths and list should be comma separated
javax.mail.internet.AddressException
- when an address is invalid
javax.mail.MessagingException
- when an error occurs when sending the email
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |