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.
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.comDISCOURSE_SMTP_PORT:587DISCOURSE_SMTP_USER_NAME: Your Amazon SES credentialsDISCOURSE_SMTP_PASSWORD: Your Amazon SES passwordDISCOURSE_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:
- Go to your
Settings Panel >> Emailor use the linkhttps://forums.example.com/admin/site_settings/category/email(replace with your own domain). - Search for
email custom headersand set your own header.
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
Pour toute autre personne qui recherche, si vous utilisez Amazon SNS pour suivre les e-mails Amazon SES, vous pouvez ajouter un en-tête d’e-mail personnalisé pour spécifier l’ensemble de configuration qui déclenche le sujet SNS :
X-SES-CONFIGURATION-SET: NomDeLensembleDeConfiguration
NomDeLensembleDeConfiguration est le nom de l’ensemble de configuration.
Cela semble fonctionner pour moi. Je prévois que SNS envoie tous les journaux SES de différentes parties de nos sites à un seul endroit.
Pour ceux qui se demandent comment définir l’en-tête e-mail personnalisé, le voici.
-
Accédez à votre
Panneau de paramètres >> E-mailou utilisez le lien ci-dessous
https://forums.example.com/admin/site_settings/category/email, remplacez le nom de domaine par le vôtre. -
Recherchez
en-têtes e-mail personnaliséset définissez les vôtres. C’est tout !