Transactional Email API
Transactional Email is a platform that allows you to send transactional emails. Unlike marketing emails, (which are mass distributions of the same marketing message to multiple recipients), transactional emails are personalized emails sent to individuals in response to events they have triggered (e.g. password recovery, billing information, delivery updates, etc).
With Transactional Email, you can:
- register a domain from which to send emails
- send transactional emails via an SMTP relay
- send transactional emails via a REST API
- view your email's delivery status
- cancel emails that you no longer wish to send
Concepts
Refer to our dedicated concepts pageOpen in new context to find definitions of the different terms referring to Transactional Email.
Quickstart
-
Configure your environment variables.
Note
This is an optional step that seeks to simplify your usage of the API.
Code -
Register your domain. Run the following command to register your domain. Make sure you note down the
dkim_configthat displays in the output, as you will need it for the next steps.Code -
Create an SPF and a DKIM record.
Find out how to create your SPF and DKIM recordsOpen in new context in our documentation.
Note
The DKIM private key is discarded when your domain is revoked. You must update the corresponding DKIM record if you register that domain again.
-
Create an MX record
Note
Adding an MX record is not mandatory but we recommend you do it to avoid getting your emails rejected.
Find out how to add an MX recordOpen in new context in our documentation.
-
Perform a check of your domain. Run the following commands to query your domain and then perform a check of your domain.
CodeNote
If the check fails,
last_errorwill describe what happened. Perform another check request once you have fixed the problem. To ensure good scoring, your DNS must be correctly set up before sending any emails. The domain check is performed asynchronously. -
Send an email via the REST API. Run the following command to send an email using the REST API.
Note
The attachment content must be base64 encoded and is limited to 2MB. In the following example, both
htmlandattachmentsfields are optional.Code -
Send an email via SMTP.
An SMTP relay is available at
smtp.tem.scaleway.comon ports25,587,2587,465(TLS) and2465(TLS).Use your
project_idto authenticate as username and your token as a password.
Requirement
- You have a Scaleway accountOpen in new context
- You are the owner of the domain name you want to use
- You have your Organization and your Project IDOpen in new context
- You have created an API keyOpen in new context and that the API key has sufficient IAM permissionsOpen in new context to perform the actions described on this page.
- You have installed
curlOpen in new context
Technical information
Regions
Scaleway's infrastructure spans different regions and Availability ZonesOpen in new context.
Transactional Email is available in the Paris region, which is represented by the following path parameter: fr-par.
Technical limitations
- Transactional Email's attachment types are limited to:
application/acad-templateapplication/acadapplication/autocad_dwgapplication/autocad_dxfapplication/dwfapplication/dxfapplication/icsapplication/pdfapplication/pkcs10application/pkcs7-mimeapplication/pkcs7-signatureapplication/vnd.dwtapplication/vnd.ms-excelapplication/vnd.ms-powerpointapplication/vnd.oasis.opendocument.spreadsheetapplication/vnd.openxmlformats-officedocument.presentationml.presentationapplication/vnd.openxmlformats-officedocument.presentationml.slideshowapplication/vnd.openxmlformats-officedocument.presentationml.templateapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetapplication/vnd.openxmlformats-officedocument.spreadsheetml.templateapplication/x-dwfapplication/x-dwgapplication/x-dwtapplication/x-dxfapplication/x-pdfapplication/x-pkcs12application/x-pkcs7-certificatesapplication/x-pkcs7-certreqrespapplication/x-pkcs7-crlapplication/x-pkcs7-mimeapplication/x-pkcs7-signatureapplication/xmlimage/gifimage/jpegimage/jpgimage/pngimage/svg+xmlimage/vnd.dwgimage/vnd.dxfmodel/vnd.dwftext/calendartext/csvtext/htmltext/plaintext/xml
- Attachment size is limited to 2 MB via API and 50 MB via SMTP.
- The recursive SPF include directive is not supported
Going further
For more information about Transactional Email, you can check out the following pages:
- Transactional Email DocumentationOpen in new context
- Scaleway Slack CommunityOpen in new context join the #transactional-email channel
- Contact our support teamOpen in new context.