By default your environment is configured to send emails from the placeholder domain “[email protected]”; this is configured from the variables section of your environment with the SS_SEND_ALL_EMAILS_FROM
environment variable.
If you try to send emails with a “from” address other than the initially provided email address, the emails might be blocked from being sent or have other issues. You will need to verify the domain to prove ownership by contacting support to get the domain verification process started.
Sending emails
As part of our managed service we manage the default PHP SMTP configuration on your environments. The default configuration is to try deliver emails directly from the server your website sits on however this is a 'best effort' configuration and should be considered for testing only. This functionality is limited and messages may not be received by your intended recipient.
Silverstripe's email service is available to environments for sending verified emails through usage of an upstream manager service.
To reliably send emails we provide an emailing service through Silverstripe's email service, however additional configuration is required to use this service. Usage of Silverstripe's email service or an alternative third-party email service is recommended for sending verified emails to ensure best chance of delivery to intended recipients.
As every remote email server has unique configuration and implements their own verification systems, we can't guarantee 100% delivery.
Setting up email domains for Silverstripe's email service
To use Silverstripe's email service to send emails, you will need to make some changes to your environment to configure certain domains you wish to send emails from (E.g. @example.com).
This can be achieved by adding the domain to the "Domains" tab in your environment configuration page or by contacting the service desk to add this configuration for you through the backend (eg. in situations where you have domains you can't configure under the "Domains" tab but require for sending of emails through Silverstripe's email service).
These changes will attempt to direct emails sent from the configured domains through Silverstripe's email service.
Additional verification is required to ensure Silverstripe's email service has authorisation to send from the domain through verifying ownership of the domains.
Verifying ownership of domain
Silverstripe's email service requires that you verify your custom domain to confirm that you own it and to prevent others from using it.
For example, if you verify the domain “example.com”, you can send email from [email protected], [email protected], or any other user at example.com. You can also send from any subdomain of that domain without explicitly verifying the subdomain. For example, if you verify example.com, you do not need to verify a.example.com or a.b.example.com.
When you initiate domain verification with us, we will give you the name and value to use for the TXT record. For example, if your domain is example.com, the TXT record settings will look similar to the following example:
Name Type Value
_amazonses.example.com TXT example-value-do-not-use
Add a TXT record to your domain’s DNS server using the specified Name and Value and then contact us so that we can check the status of the domain verification.
If your DNS provider does not allow DNS record names to contain underscores, you can omit _amazonses from the Name. In that case, for the preceding example, the TXT record name would be example.com
instead of _amazonses.example.com
. To make the record easier to recognize and maintain, you can also optionally prefix the Value with amazonses:. In the previous example, the value of the TXT record would therefore be amazonses:example-value-do-not-use
.
DKIM
DomainKeys Identified Mail (DKIM) is a standard that allows senders to sign their email messages and ISPs to use those signatures to verify that those messages are legitimate and have not been modified by a third party in transit.
An email message that is sent using DKIM includes a DKIM-Signature header field that contains a cryptographically-signed representation of all, or part, of the message. An ISP receiving the message can decode the cryptographic signature using a public key, published in the sender’s DNS record, to ensure that the message is authentic. For more information about DKIM, see https://dkim.org.
DKIM signatures are optional. You might decide to sign your email using a DKIM signature to enhance deliverability with DKIM-compliant ISPs.
When you contact us to setup domain verification we will provide DNS records to configure DKIM. The CNAME record setting will look similar to the following example:
Name Type Value
example-value-do-not-use-1._domainkey.example.com CNAME example-value-do-not-use-1.dkim.amazonses.com
example-value-do-not-use-2._domainkey.example.com CNAME example-value-do-not-use-2.dkim.amazonses.com
example-value-do-not-use-3._domainkey.example.com CNAME example-value-do-not-use-3.dkim.amazonses.com
Contact support to get the domain verification process started.
SPF Record Guidelines for Email Sending
When using Amazon Simple Email Service (SES) to send emails, there’s no need to add SPF records. However, if you’re utilising a different mail server in your application, it’s important to add the appropriate SPF records.
Configure Silverstripe to use the sender domain for emails
See the developer documentation for further documentation on setting up email in Silverstripe CMS.
Debugging email
You can search all email sent with logs by using the search query log_type:postfix\/*
in your stream. Note that if the email has been successfully sent and not been “bounced”, then we cannot determine the delivery success of the email.
See the Silverstripe CMS developer guides on how email is managed. The Sendmail transport is recommended for projects and is supported in Silverstripe Cloud.
Advanced email sending
If you send a lot of emails, want more control of delivery success or require more advanced email features, we highly recommend that you look for a provider that specialises in emails with an API that you can use in your Silverstripe CMS code.
If you’re attempting to send emails using a custom domain name but they are not being delivered, contact support to check that your custom domain is verified to send emails.
Receiving emails
Silverstripe Cloud currently doesn’t provide an email server where you can receive emails.