Help Center


Email Configuration

https://app.chaskiq.io/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbXdEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--827f2d0b5794f7bb660c48b79e228655bd857bed/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVdscGFRPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--cf24ea7784b3789671bb09c4029aca003c26b32d/me.jpg

Written by Miguel Michelson

updated

Chaskiq work with Amazon SES for email delivery, you could use any SMTP service but with Amazon SES give Chaskiq's messaging super powers.

To start using Amazon SES you need to enter to your Amazon console & configure your domain. Amazon SES requires that you verify your email address or domain, to confirm that you own it and to prevent others from using it.
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.html

Configure notifications for your Verified Domain:

Once the domain is verified you can edit the configuration of the domain and attach a SNS topic, So, you’d go to the notification settings for an identity and select Include original headers next to the bounce notification configuration:

Create SNS Topics

You have to create your own SNS topic and add topic subscriptions. Just make sure you uncheck send raw messages , the URL schema to subscribe on your app is https://YOURDOMAIN/api/v1/hooks , it should be automatically verified. if you are using a local dev server make sure the url is public, you can use services like ngrok to tunnel your dev machine and expose the url.

Attach your SNS to SES configuration set

Go to SES -> configuration sets and create one and then create an SNS destination where you could add the events you want to notify. (Bounce, Click, Complaint, Delivery, Open, Reject, Send)

Finnaly in your app environment variables you may want to set the SNS_CONFIGURATION_SET variable with the name of your already created set , if you set this you will need to restart the app in order for changes have effect.


Create a Special S3 Bucket to store emails and send them to chaskiq:

first, you will need to create a bucket with the following permissions:

{ 
"Version": "2012-10-17",
  "Statement": [{ "Sid": "AllowSESPuts",
  "Effect": "Allow",
  "Principal": {
   "Service": "ses.amazonaws.com" },
   "Action": "s3:PutObject",
   "Resource": "arn:aws:s3:::hermes-incoming-mails/*",
   "Condition": {
   "StringEquals": {
    "aws:Referer": "YOUR_ACCOUNT_ID"
   }
  } 
 }]
}

reference: https://aws.amazon.com/es/premiumsupport/knowledge-center/ses-receive-inbound-emails/
Then you will need to create a rule set for amazon SES, that's is a S3 action, set that as the active rule and set the created bucket and the SNS topic that you created earlier.


That's all, have a happy Mailin.