How to use Amazon SES for sending emails to users?

AI-generated summary

Using Amazon SES for Sending Emails in Discourse

To integrate Amazon SES with Discourse, configure the email settings in your app.yml file with the following:

  • DISCOURSE_SMTP_ADDRESS: email-smtp.us-east-1.amazonaws.com
  • DISCOURSE_SMTP_PORT: 587
  • DISCOURSE_SMTP_USER_NAME: Your Amazon SES credentials
  • DISCOURSE_SMTP_PASSWORD: Your Amazon SES password
  • DISCOURSE_SMTP_ENABLE_START_TLS: true

After updating the configuration, run ./launcher rebuild app to apply the changes.

Additionally, if you’re using Amazon SNS to track Amazon SES emails, you can add a custom email header to specify the configuration set that triggers the SNS topic. To do this, add the following header:

X-SES-CONFIGURATION-SET: ConfigSetName

Replace ConfigSetName with the name of your configuration set.

To set custom email headers in Discourse, follow these steps:

  1. Go to your Settings Panel >> Email or use the link https://forums.example.com/admin/site_settings/category/email (replace with your own domain).
  2. Search for email custom headers and set your own header.

Hello All I want to query how to configure and integrate Amazon SES with discourse to use it for sending emails from an verified Amazon SES email.

This is pretty easy to setup, in your app.yml:

  ## TODO: The mailserver this Discourse instance will use
  DISCOURSE_SMTP_ADDRESS: email-smtp.us-east-1.amazonaws.com 
  DISCOURSE_SMTP_PORT: 587                        
  DISCOURSE_SMTP_USER_NAME: CREDIENTIALS
  DISCOURSE_SMTP_PASSWORD: CREDIENTIALSPW
  DISCOURSE_SMTP_ENABLE_START_TLS: true

Worked straight out of the box for me.

Edit:
To apply these changes you will need to run: ./launcher rebuild app

Para qualquer outra pessoa que esteja procurando: se você usar o Amazon SNS para rastrear e-mails do Amazon SES, pode adicionar um cabeçalho de e-mail personalizado para especificar o conjunto de configurações que aciona o tópico do SNS:

X-SES-CONFIGURATION-SET: ConfigSetName

ConfigSetName é o nome do conjunto de configurações.

Isso parece estar funcionando para mim. Estou planejando fazer com que o SNS envie todos os logs do SES de diferentes partes dos nossos sites para um único local.

Para aqueles que estão se perguntando como definir o cabeçalho de e-mail personalizado, aqui está.

  1. Vá para seu Painel de Configurações >> E-mail ou use o link abaixo:
    https://forums.example.com/admin/site_settings/category/email, substituindo o nome do domínio pelo seu.

  2. Pesquise por cabeçalhos de e-mail personalizados e defina os seus. É isso!