Server Sendmail
Installation of sendmail in the server droplet / machine
This guide is focus more on Linux OS
Firstly, install Sendmail using the command:
$ sudo apt-get install sendmailNow configure /etc/hosts file. To find the hostname, use the command:
$ hostnameThen type the command:
$ sudo nano /etc/hostsOn the line starting with 127.0.0.1, add the hostname to the end so it looks the same as:
$ 127.0.0.1 localhost hostnameNow press Ctrl+x, then βYβ to save and exit.
Run Sendmailβs config and answer βYβ to everything
$ sudo sendmailconfigNow restart Apache with the command:
$ sudo service apache2 restartπCongrats!, your server can now send an email using our recruit application.
You can use the following instructions to send email using the sendmail command:
For example, I have created a file
file.txtwith the following text:
The command for sending the message will be:

You can use -s option to specify the email subject.
Reference: https://www.digitalocean.com/community/tutorials/send-email-linux-command-line
Last updated