The approach below probably is not safe, since it exposes your email address with password. 1. Install ssmtp : sudo apt-get install ssmtp 2. Edit the ssmtp config file : sudo gedit /etc/ssmtp/ssmtp.conf Enter this in the file: root=username@gmail.com mailhub=smtp.gmail.com:465 rewriteDomain=gmail.com AuthUser=username AuthPass=password FromLineOverride=YES UseTLS=YES 3. Enter the email address of the person who will … Continue reading How to send an email in a command line?