Send a transactional email through SMTP

While you can send transactional emails using code, our API also supports sending transactional emails through SMTP.

To start sending emails through our SMTP, simply configure your system with these parameters.

ParameterValue
Hostsmtp.cakemail.dev
SMTPS Port465
STARTTLS Port587
usernameYour Cakemail username
passwordYour Cakemail password

Just like with the API endpoint, you need to confirm a sender before sending emails to your customers. The sender email address must match the envelope "mail from".

You can customize your SMTP call with headers. Currently, we support the following headers:

NameDescription
x-sender-idThe ID of a confirmed sender. If specified, it will take precedence over the envelope mail from.
x-track-opensSet to "true" to track opens
x-track-clicks-htmlSet to "true" to track clicks in the HTML version
x-track-clicks-textSet to "true" to track clicks in the text version
x-group-idAllows you to group multiple transaction emails together for analytics
x-account-idAllows you to send on behalf of a sub-account
curl \
 --url 'smtp://smtp.cakemail.dev:587' \
 --mail-from '[email protected]' \
 --mail-rcpt '[email protected]' \
 --upload-file mail.txt \
 --user '[email protected]:password' \
 --ssl \
 -vv