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

다른 분들도 이 문제를 찾고 계신 경우, Amazon SES 이메일 추적을 위해 Amazon SNS를 사용하신다면 사용자 정의 이메일 헤더를 추가하여 어떤 설정 세트가 SNS 토픽을 트리거하는지 지정할 수 있습니다:

X-SES-CONFIGURATION-SET: ConfigSetName

ConfigSetName은 설정 세트의 이름입니다.

제 환경에서는 이 방법으로 정상 작동하는 것 같습니다. SNS를 통해 사이트의 여러 부분에서 생성되는 SES 로그를 한 곳으로 모을 계획입니다.

커스텀 이메일 헤더를 어떻게 설정하는지 궁금해하시는 분들을 위해 방법을 안내드립니다.

  1. 설정 패널 >> 이메일로 이동하거나 아래 링크를 사용하세요.
    https://forums.example.com/admin/site_settings/category/email
    도메인 이름은 본인 것으로 교체해야 합니다.

  2. email custom headers를 검색하고 원하는 값을 설정하세요. 이걸로 끝입니다!