Email Guide
Overview¶
The Platform 6 Email service sends mail messages to mail recipients.
The service uses JavaMail API to send messages. This API is configured using a number of documented properties. Technical details of all possible JavaMail properties can be found here.
In addition, Platform 6 used the following additional properties:
p6.email.username
p6.email.password
p6.email.bcc
Mail service properties are stored in collections called Email Profiles. Each profile can be configured for a different email provider.
When sending mail via this service you can specify a profile to use. Alternatively, the service will use the default profile if none is specified.
A mail message can consist of a single message body or be composed of several parts (mail attachments). The structure of a mail is expressed as a common message and send to the mail service via the common message bus.
For more information about the user interface, read the guide Email Profiles user interface.
API configuration examples¶
JavaMail with Gmail¶
Using TLS connection¶
Key | Value |
---|---|
p6.email.username |
Gmail mailbox address |
p6.email.password |
Gmail mailbox password |
mail.smtp.auth |
true |
mail.smtp.starttls.enable |
true |
mail.smtp.host |
smtp.gmail.com |
mail.smtp.port |
587 |
Using SSL connection¶
Key | Value |
---|---|
p6.email.username |
Gmail mailbox address |
p6.email.password |
Gmail mailbox password |
mail.smtp.host |
smtp.gmail.com |
mail.smtp.socketFactory.port |
465 |
mail.smtp.socketFactory.class |
javax.net.ssl.SSLSocketFactory |
mail.smtp.auth |
true |
mail.smtp.port |
465 |
JavaMail with Amazon Simple Email Service (SES)¶
Generate SMTP credentials (username and password) online using your AWS console.
Key | Value |
---|---|
p6.email.username |
SMTP username |
p6.email.password |
SMTP password |
mail.smtp.auth |
true |
mail.smtp.ssl.enable |
true |
mail.transport.protocol |
smtps |
mail.smtp.host |
email-smtp.eu-west-1.amazonaws.com |
mail.smtp.port |
465 |
mail.smtp.connectiontimeout |
10000 |
mail.smtp.timeout |
10000 |
JavaMail with Google SendGrid¶
Key | Value |
---|---|
p6.email.username |
Sendgrid username |
p6.email.password |
Sendgrid password |
mail.smtp.auth |
true |
mail.smtp.host |
smtp.sendgrid.net |
mail.smtp.port |
2525 |
Scripting¶
You send emails with the Scripts service using the email
DSL.