Configuring Griddler with SendGrid and Gmail for Work

425 Views Asked by At

I am in need of help figuring out a how to set up incbound email with Griddler and Gmail for Work. I've got a Rails 4 that I'm trying to configure to receive incoming emails using Griddler and SendGrid. I followed the instructions on the Griddler readme exactly. Next I created a tunnel to my localhost environment using ngrok.io. I then went into the SendGrid web app and created a webhook to catch emails going to example.com and send them to the url abc123.ngrok.io.

So far, I think I've got the setup correct. Next I set up an MX record in my domains DNS zone file. The host is @ and it points to mx.sendgrid.net.

Here is where things get tricky for me. My site has Gmail for Work set up. I'm not super particular on the details, but essentially, I want a way for users to send a message to [email protected] and have it routed to Griddler, rather than Gmail. The format of the email address is not terribly important except that it must be dynamic in the sense that foo can be replaced with anything and it will still be routed to Griddler, as long as the domain is bar.example.com. If the domain is just example.com, then it should be routed to Gmail.

I've not had much luck finding resources on how to set this up.

Thanks!

1

There are 1 best solutions below

0
On

You need to configure 2 separate MX records, one for example.com, and one for bar.example.com. Have the subdomain record point to SendGrid, and have the domain use gmail's MX.