Configure sending mail by sendmail in Ubuntu Linux

Background: I need email functionality to send emails from the web server by querying data from MySQL database and email the result to appropriate recipient. Workaround:  Install sendmail. sudo apt-get update sudo apt-get install sendmail Install mailutils. sudo apt-get install mailutils Configure the /etc/hosts file, provide your domain name in the following format 127.0.0.1 localhost…