I have installed mailutils to enable me to send emails via the terminal. After install I tried the following:
Code:
mail -s "Hello Friend" myelail@gmail.com
I returned on the Cc and then added some text for the body then pressed CTRL+D to send. I was then at the prompt again with no success or failure message, however no email either. I was a bit suspicious of it just working without any SMTP setting etc being configured. So then I tried the following:
Code:
~ sudo apt-get install ssmtp
~ sudo vim /etc/ssmtp/ssmtp.conf
Uncomment FromLineOverride=YES by deleting the #
Added the following to the file:
AuthUser=<user>@gmail.com
AuthPass=Your-Gmail-Password
mailhub=smtp.gmail.com:587
UseSTARTTLS=YES
Tried sending again and still no email sent.
Do you know why the mail command is failing and how I correct it?
Many thanks
Tim