Search code examples
emailtcpdnssendgrid

Unable to send email to the same domain from which it's sent via SendGrid


My setup is as follows:

  • VPS running on DigitalOcean
  • DNS running on DigitalOcean (managing the domain XYZ.com which directs to the VPS)
  • day-to-day business email running in a 3rd party provider service (with addresses like name@XYZ.com)
  • transactional email API (SendGrid) using the same domain as the VPS and business email (XYZ.com)

My problem is, whenever I try to send some transactional email via SendGrid to one of my business addresses I get the messages blocked with the following notification from SendGrid:

error dialing remote address: dial tcp <SOME_IP_HERE>:0-><ANOTHER_IP_HERE>:25: i/o timeout

I reckon the issue might me sending and receiving the email from the same domain, however, I have no idea how to tackle this. What should I do?


Solution

  • It turns out it was an issue with anty-spoof filter on my business email. I turned it off and it all works now.