Package org.craftercms.commons.mail
Interface EmailFactory
- All Known Implementing Classes:
EmailFactoryImpl
public interface EmailFactory
Factory for creating
Emails.- Author:
- avasquez
-
Method Summary
Modifier and TypeMethodDescriptiongetEmail(String from, String[] to, String[] cc, String[] bcc, String subject, String body, boolean html, File... attachments) Creates a newEmail.getEmail(String from, String[] to, String[] cc, String[] bcc, String subject, String templateName, Object templateModel, boolean html, File... attachments) Creates a newEmail.getEmail(String from, String[] to, String[] cc, String[] bcc, String replyTo, String subject, String body, boolean html, File... attachments) Creates a newEmail.getEmail(String from, String[] to, String[] cc, String[] bcc, String replyTo, String subject, String templateName, Object templateModel, boolean html, File... attachments) Creates a newEmail.
-
Method Details
-
getEmail
Email getEmail(String from, String[] to, String[] cc, String[] bcc, String subject, String body, boolean html, File... attachments) throws EmailException Creates a newEmail.- Parameters:
from- the sender's addressto- the recipients' addresses (optional)cc- the CC recipients' addresses (optional)bcc- the BCC recipients' addresses (optional)subject- the subject of the emailbody- the text body of the emailhtml- if the body is in HTML formatattachments- the attachments to add to the email- Returns:
- the created email
- Throws:
EmailException
-
getEmail
Email getEmail(String from, String[] to, String[] cc, String[] bcc, String replyTo, String subject, String body, boolean html, File... attachments) throws EmailException Creates a newEmail.- Parameters:
from- the sender's addressto- the recipients' addresses (optional)cc- the CC recipients' addresses (optional)bcc- the BCC recipients' addresses (optional)replyTo- the address to reply tosubject- the subject of the emailbody- the text body of the emailhtml- if the body is in HTML format- Returns:
- the created email
- Throws:
EmailException
-
getEmail
Email getEmail(String from, String[] to, String[] cc, String[] bcc, String subject, String templateName, Object templateModel, boolean html, File... attachments) throws EmailException Creates a newEmail.- Parameters:
from- the sender's addressto- the recipients' addresses (optional)cc- the CC recipients' addresses (optional)bcc- the BCC recipients' addresses (optional)subject- the subject of the emailtemplateName- the template name of the emailtemplateModel- the template model of the emailhtml- if the body is in HTML format- Returns:
- the created email
- Throws:
EmailException
-
getEmail
Email getEmail(String from, String[] to, String[] cc, String[] bcc, String replyTo, String subject, String templateName, Object templateModel, boolean html, File... attachments) throws EmailException Creates a newEmail.- Parameters:
from- the sender's addressto- the recipients' addresses (optional)cc- the CC recipients' addresses (optional)bcc- the BCC recipients' addresses (optional)replyTo- the address to reply tosubject- the subject of the emailtemplateName- the template name of the emailtemplateModel- the template model of the emailhtml- if the body is in HTML format- Returns:
- the created email
- Throws:
EmailException
-