6
votes

I am using the SendGrid for receiving the emails from my domain (example.com). I have configured all the steps from the mentioned link Sendgrid Inbound Parse Webhook.

I have added all the name records(MX records and CNAMES) in the GoDaddy DNS records against my domain.

The issue is when I send an email to [email protected]. When an email is sent to this email-id there is no mail delivery failure report. There is no any statistics for the SendGird console about the webhook got triggered.

I am not able to figure out what went wrong in this process. As emails in the sendgrid webhook are not received.

I think they are lost in between.

2
Were you able to figure out the issue? I did the following 1) In my DNS, added MX record for my domain and pointed it to mx.sendgrid.net 2) Added a destination URL to receive the email data. On sending the mail to my domain, my destination URL is not receiving anything. I followed the instructions on the link ( sendgrid.com/docs/for-developers/parsing-email/…)Paroksh Saxena
did you figure out how to solve this issue? Im facing the same thingGlauber
if your testing in local, make a test api to console emails you receive and then expose it using ngrok.Rahul Purohit

2 Answers

3
votes

I found the documentation to be insufficient in this area. You need to send to the subdomain, listed in your MX record, which redirects mail to sendgrid.

For example, if you add a MX record for email.example.com, you need to send the email to [email protected].

1
votes

One of the best ways to test if a 3rd party Web API post is being triggered or not is by using a tool that receives posts and provides visibility to the data sent along with the post (e.g. Headers, parameters, and the related data in json, text, etc).

One of the tools that I have used to test if a post is being triggered or not is offered by: https://requestbin.fullcontact.com/. Take these steps to set-up your testing environment:

(note: I am not associated with the requestbin.fullcontact.com resource - I am just an enthusiastic fan of this very useful service).

  1. Go to requestbin and "Create a RequestBin". This will create your own unique requestbin URL. (e.g. https://requestbin.fullcontact.com/xxxxx)

  2. Copy this URL, and paste it into your SendGrid Inbound Parse "Destination URL".

  3. Keep your testing environment simple initially by NOT checking the "Additional Options" (Check incoming emails for spam & Post the raw...).

  4. Be sure you do not enter a 'Subdomain' in the SendGrid Inbound Parse "Receiving Domain" unless you are expecting users to use the subdomain as part of your email address.

  5. Re: #3, same applies to your DNS at GoDaddy. Your email should also not reflect a 'subdomain' as part of your MX record (e.g. you should not use mail.example.com).

  6. Click "Add".

  7. Now, send an email to your domain (e.g. [email protected]).

  8. Check your requestbin to see if a post was made by using your unique requestbin URL, appended with "?inspect" (e.g. https://requestbin.fullcontact.com/xxxxx?inspect).

Result: You should see post information when viewing your 'inspect' URL.

Using this first step of a diagnostic process to test your usage of SendGrid's Inbound Parse should help expose potential problems in your configuration (e.g. DNS set up would be the next area to look at if no post data is being received in the requestbin inspect URL). Good luck.