By techbasati
Whenever sending any email using terminal they moved to spam directory currenlty using this command to send mail echo “This is the body of the email” | mail -s “This is the subject line” rajeshchandratiwari@gmail.com
Please try to resolve issue as soon as possible.
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!
Hi @techbasati
DigitalOcean only offers an unmanaged service. That means they will make sure the hardware works, there is power and internet connections. The rest is up to you to manage. That means you need to setup your own droplet/server the way you want it - and you need to make sure it’s up-to-date and secure.
Have a look at this tutorial to learn how to setup Postfix: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-on-ubuntu-16-04
I’d definitely take a look at the guide that @hansen referenced. It’s a good starting point and will get you moving in the right direction.
When it comes to e-mail, setting up Postfix or Sendmail alone will not “just work” as expected, if your intent is to stay out of SPAM/Junk folders.
SPF, DKIM, DMARC, and PTR (Reverse DNS) are the main things you need to look at and setup if you want to stay out of SPAM/Junk folders. Without these, the vast majority of what you send will land in these folders, unless the e-mail address is whitelisted for every single recipient you send to.
That being said, managing a mail server can be a major pain. I’ve done it, I’ll most likely end up doing it again in the future, but I don’t like it. There’s simply so/too many factors and because of this, that’s why so many third-party solutions, such as SendGrid and Mailgun, have popped on to the scene.
If you’re wanting something simple, less complex, etc – running your own mail server won’t provide that. I’d recommend looking at SendGrid, MailGun, Google Apps (G Suite), etc. Many are free for a certain number of monthly mails, others are paid (specifically G Suite).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.