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.
Parameter | Value |
---|---|
Host | smtp.cakemail.dev |
SMTPS Port | 465 |
STARTTLS Port | 587 |
username | Your Cakemail username |
password | Your 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:
Name | Description |
---|---|
x-sender-id | The ID of a confirmed sender. If specified, it will take precedence over the envelope mail from. |
x-track-opens | Set to "true" to track opens |
x-track-clicks-html | Set to "true" to track clicks in the HTML version |
x-track-clicks-text | Set to "true" to track clicks in the text version |
x-group-id | Allows you to group multiple transaction emails together for analytics |
x-account-id | Allows 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