public class EmailProvider extends Object implements FormProcessProvider
FormProcessProvider
that send's and e-mail to some receivers. All the properties of the e-mail are being
set via the properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.SENDER
SENDER_NAME
SUBJECT
RECEIVER_TO
RECEIVER_CC
RECEIVER_BCC
RECEIVER_DEBUG
REPLY_TO
EMAIL_CONTENT_TEXT
EMAIL_CONTENT_HTML
Writer
, see CONTENT
and ERROR_MESSAGE
.Modifier and Type | Field and Description |
---|---|
static String |
ATTACHMENTS
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .If the value is true , the file attachments of the Form will be added to the e-mail. |
static String |
CONTENT
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .The value may contain the message that is written to the Writer passed to
onFormSuccess(Writer, Form, Map) , in case the e-mail was successfully sent. |
static String |
EMAIL_CONTENT_HTML
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .Value can contain the HTML-content for the e-mail to send. |
static String |
EMAIL_CONTENT_TEXT
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .Value can contain the text-content for the e-mail to send. |
static String |
ERROR_MESSAGE
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .The value may contain the message that is written to the Writer passed to
onFormSuccess(Writer, Form, Map) , in case an error occurs while sending the e-mail. |
static String |
RECEIVER_BCC
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .Value can contain a comma-separated list of e-mail addresses to send the mail with Mail.RecipientType.BCC |
static String |
RECEIVER_CC
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .Value can contain a comma-separated list of e-mail addresses to send the mail with Mail.RecipientType.CC |
static String |
RECEIVER_DEBUG
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .Value can contain a comma-separated list of e-mail addresses to which the e-mail will be send (instead of the real receivers) |
static String |
RECEIVER_TO
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .Value must contain a comma-separated list of e-mail addresses to send the mail with Mail.RecipientType.TO |
static String |
REPLY_TO
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .Value can contain a comma-separated list of e-mail addresses to reply-to |
static String |
SEND_DISABLED |
static String |
SENDER
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .Value must contain the sender's e-mail address |
static String |
SENDER_NAME
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .Value can contain the sender's name |
static String |
SUBJECT
Key for the
properties -Map passed to onFormSuccess(Writer, Form, Map) .Value must contain the subject for the e-mail |
Constructor and Description |
---|
EmailProvider(MailTransport mailTransport) |
Modifier and Type | Method and Description |
---|---|
boolean |
isValidReceiver(String receiverEmails) |
void |
onFormSuccess(Writer writer,
Form form,
Map<String,Object> properties) |
public static final String RECEIVER_TO
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.Mail.RecipientType.TO
public static final String RECEIVER_CC
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.Mail.RecipientType.CC
public static final String RECEIVER_BCC
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.Mail.RecipientType.BCC
public static final String SENDER
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.public static final String SENDER_NAME
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.public static final String SEND_DISABLED
public static final String REPLY_TO
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.public static final String SUBJECT
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.public static final String RECEIVER_DEBUG
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.public static final String EMAIL_CONTENT_HTML
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.EMAIL_CONTENT_TEXT
,
Constant Field Valuespublic static final String EMAIL_CONTENT_TEXT
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.EMAIL_CONTENT_HTML
,
Constant Field Valuespublic static final String ATTACHMENTS
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.true
, the file attachments of the Form
will be added to the e-mail.public static final String CONTENT
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.Writer
passed to
onFormSuccess(Writer, Form, Map)
, in case the e-mail was successfully sent.public static final String ERROR_MESSAGE
properties
-Map
passed to onFormSuccess(Writer, Form, Map)
.Writer
passed to
onFormSuccess(Writer, Form, Map)
, in case an error occurs while sending the e-mail.public EmailProvider(MailTransport mailTransport)
public void onFormSuccess(Writer writer, Form form, Map<String,Object> properties)
onFormSuccess
in interface FormProcessProvider
public boolean isValidReceiver(String receiverEmails)
Copyright © 2011–2019 aiticon GmbH. All rights reserved.