How to receive the emails using mailgun in node.js

2019-03-03 02:52发布

问题:

In my application im using mailgun module to send and receive emails using node.js.I don't know how to receive the incoming emails.I created route to receive the incoming email.but its not working.

回答1:

Mailgun is simply posting URL encoded form data.

Check out this discussion on receiving POST data in node.js: How do you extract POST data in Node.js?



回答2:

Also it's worth noting that for whatever mail-header-related reasons, if you have mailgun set to forward something to a@b.com, then messages sent from a@b.com will not show up back in your inbox. Send mail from a different address. Note that mailgun can sometimes tell if you're using the Send As feature in gmail, and will know your main address.