Setting Up Email Delivery in Ghost CMS Using AWS SES

3 min read

Ghost CMS has become a popular choice for bloggers and businesses looking to create clean, professional websites. A crucial aspect of any website is reliable email communication. This blog will guide you through setting up email delivery in Ghost CMS using Amazon Web Services' Simple Email Service (AWS SES), ensuring your subscriptions and notifications are sent without a hitch.

Understanding the Configuration

To integrate AWS SES with Ghost CMS for sending emails, you must edit the config.production.json file. Here is the essential configuration:

json
"mail": {
  "transport": "SMTP",
  "options": {
    "host": "email-smtp.eu-west-1.amazonaws.com",
    "port": 465,
    "service": "SES",
    "from": "'Name' <[email protected]>",
    "auth": {
      "user": "XXXXXXXXXXXXX",
      "pass": "XXXXXPASSWORDXXXXXXXXXXXX"
    }
  }
}

Ensure you replace the following variables with the correct ones for your project

  • From with your name & email
  • Auth user & password with your AWS SES SMTP credentials. This configuration tells Ghost CMS how to communicate with AWS SES to send emails.

This config applies to Ghost version: 5.82.2

Setting Up AWS SES

Before using SES to send emails, add and verify your domain to ensure AWS SES can send emails on your behalf. Here’s how:

  1. Log into your AWS Management Console.
  2. Navigate to the SES section.
  3. Under Identity Management, choose "Domains" and then "Verify a New Domain."
  4. Follow the instructions to add the DNS records provided by AWS to your domain’s DNS settings.

Verifying your domain helps avoid your emails being marked as spam or not being delivered at all. AWS cannot send emails without the domain being verified. 

Generating SMTP Credentials Correctly

It’s important to use the correct credentials for SMTP. Here’s how to generate them in AWS SES:

  1. In the AWS SES dashboard, find the "SMTP Settings" area and click "Create My SMTP Credentials."
  2. Follow the prompt to create a new set of credentials. Make sure to store these credentials securely as they will be used in your Ghost CMS configuration.

Testing and Troubleshooting

After setting up, it’s wise to test your configuration:

  1. Navigate to your project home, and subscribe to the site. This should trigger an email to your email address. 
  2. If the email fails, you can review the Ghost log file, which will give more information on the reason for the failure. 
  3. If the email fails, double-check your domain verification status and SMTP settings.

Common issues usually involve misconfiguration of SMTP credentials or DNS settings. Ensure all steps have been followed correctly, and your domain is fully verified.

Important note

Setting up SMTP is not the same process as setting up Email newsletter in Ghost. Email newsletter uses Mailgun which is the default setting in Ghost. as per the current version.

Conclusion

Setting up email delivery using AWS SES in Ghost CMS can significantly enhance your site's reliability in communication. By following these steps, you can ensure your website communicates efficiently with your audience, keeping them engaged and informed.

Disclaimer

Remember, handling SMTP credentials involves security risks. Always store your credentials securely and only share them with trusted personnel. Follow AWS best practices for a secure and effective setup.