Installation
This example is based on a Heroku installation of Chatwoot, and using SendGrid for outgoing email. For more information about installing Chatwoot, go here.Configuring inbound reply emails
Firstly, we need to tell our Chatwoot instance what mailer we’re using to handle incoming emails. We do that with a config var. Go to your Heroku dashboard, click on your Chatwoot instance and click settings.

potatosalad
, but like all passwords - you should always use a secure mixture of letters, numbers and symbols.

SendGrid
Now we’re going to set up the domain we’re using for inbound emails. Because you’re most likely going to have an email service like Google Workspace or Microsoft 365 for Business, you should use a subdomain for your inbound emails to Chatwoot. For example, let’s say we used support.example.com as our domain. In this instance, we’d add an MX record pointing support.example.com tomx.sendgrid.net
with a priority of 10
.
You should wait a while (usually an hour will do). You can use mxtoolbox.com to check if the MX record has been propogated. If you see something like this, you can move onto the next step:




https://actionmailbox:potatosalad@chatwoot.example.com/rails/action_mailbox/sendgrid/inbound_emails
potatosalad
is the password we set earlier, and chatwoot.example.com
is the URL of our Chatwoot instance. Everything else should stay the same.

Make sure to check “POST the raw, full MIME message”. In order to function correctly, Action Mailbox needs the raw MIME message.

Setting the inbound domain variable in Heroku
Finally, we need to tell our Chatwoot installation what domain we’re using with SendGrid. Your variable should look like this:support.example.com
to the domain you used with SendGrid.
