Quantcast
Channel: How to send mail from the command line? - Ask Ubuntu
Viewing all articles
Browse latest Browse all 18

Answer by jet for How to send mail from the command line?

$
0
0
apt-get install libio-socket-ssl-perl libnet-ssleay-perl sendemail

usage:

sendemail -f fromuser@gmail.com -t touser@domain.com -u subject -m "message" -s smtp.gmail.com:587 -o tls=yes -xu gmailaccount@gmail.com -xp gmailpassword 

If you don't want to specify your password in the command line (generally not a good thing to do), you can omit that parameter and sendemail will prompt you for the password... and display it on the screen, but at least it won't be in your command line history.


Viewing all articles
Browse latest Browse all 18

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>