Reputation: 1803
I'm using nodemailer, and a direct transport to send an email. The email is successfully sent, but blocked intermittently by the recipient's firewall and never ended up in the recipient email inbox.
Here's my code that sends the nodemailer email:
var nodemailer = require('nodemailer'),
var transport = nodemailer.createTransport(sendmail());
var mailOptions = {
to: '[email protected]',
from: 'Sender <[email protected]>',
subject: 'Subject',
html: 'html'
};
transport.sendMail(mailOptions, function(err, info) {});
When I change my to
to a @gmail.com
email, my mail was sent through. I'm not sure how the recipient firewall is configured, but is there a way for me to increase the chances of my email making it across?
Note that blah.com
, the from
email domain that I'm sending out from is not actually a registered domain. I hosted my server on localhost
. Could hosting on AWS, registering the domain blah.com
and adding in MX records somehow increase the chances of my email being sent through?
Upvotes: 0
Views: 1596
Reputation: 3266
This is what usually happens when a mail is been sent from a domain like blah.com,
What happens in your case is that step 3 is not setup, therefore you cannot successfully send the mail. It would be a lot easier to use a 3rd party service to send mail because they pretty much hold your hand through the entire process and sign all the messages for you.
So you either need to implement these standards yourself or need to use a third party to increase your deliverability.
Upvotes: 1