When I send email using cli it doesnt go in spam but when I use nodemailer it goes in spam.

I see this in mail header ( when sent using nodemailer) Received: from [] (unknown [x.x.x.x]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPSA id 7A2E4C2294 for; Fri, 22 Sep 2017 15:07:25 +0000 (UTC)

But the is not present when sent using cli…

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


I would recommend using SMTP to send out your emails. This would drastically improve the delivery rate of your emails and you would have the correct host in your email headers.

For example you could use Gmail’s SMTP service or setup your own on your droplet. If you decide to go with Gmail here’s a nice guide on how to configure and set that all up:

Hope that this helps! Regards, Bobby