Skip to content

Guide

Overview

The Platform 6 Email service sends mail messages to mail recipients.

The service uses Jakarta Mail (formerly JavaMail), a Jakarta EE API used to send and receive email via SMTP, POP3 and IMAP API. This API is configured using a number of documented properties. Technical details of all possible Jakarta Mail properties can be found here.

Many of the old JavaMail properties are also valid and can be found here.

In addition, Platform 6 uses the following proprietary 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

Jakarta Mail 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

Jakarta Mail with Amazon Simple Email Service (SES)

Generate SMTP credentials (username and password) online using your AWS console.

Note

This example species the TLS Wrapper (or smtps), however connection using STARTTLS is also possible.

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.smtps.host email-smtp.eu-west-1.amazonaws.com
mail.smtps.port 465
mail.smtp.connectiontimeout 10000
mail.smtp.timeout 10000

Jakarta Mail with 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

Jakarta Mail with Mailjet

Key Value
p6.email.username Mailjet username
p6.email.password Mailjet password
mail.smtp.auth true
mail.smtp.host in-v3.mailjet.com
mail.smtp.port 587

Scripting

You send emails with the Scripts service using the email DSL.