How can I send email using Sendmail ?

August 14, 2017 1.3k views
Email Ubuntu 16.04

Hi, I'm trying to send email using SendMail. I tried all the tutorials on DO community to configure SendMail. I can send email but not receive email.

These are my steps.

  • Installing SendMail
sudo apt-get install sendmail mailutils sendmail-bin
  • Editing hosts localhost to localhost localhost.localdomain RabbitHost
  • Sending mail
time echo testmail | sendmail

I got no errors or warnings, but I didn't receive email.

How can I solve this ? Thank you

1 Answer

How exactly you are trying to send the email ?

To send an email using commandline try something like

mail -s "Test Email" < /dev/null


sendmail < /tmp/email.txt

Have another answer? Share your knowledge.