On Ubuntu 13.04 I have been trying to send emails from the command line but the mail command will not return. I am running these from inside a putty terminal:
sudo apt-get install mailutils
sudo apt-get install sendemail
echo "test message" | sendmail -s 'test subject' me@gmail.com
or
sendmail -s "test" me@gmail.com < out
both hange so the the cursor does not return to the command prompt. I have also tried other variations using mail
,ssmtp
, and postfix
(also installed them all). They all do the same thing. For ssmtp
I added config like this:
root=aaaa@gmail.com
mailhub=smtp.gmail.com:465
rewriteDomain=gmail.com
AuthUser=aaaa
AuthPass=pass
FromLineOverride=YES