Q:

Send mail from command line?

How I can send a simple mail from Ubuntu command line without giving the password for the email account which I'm sending to?

A:

sudo apt-get install mailutils
mail -s "Subject" email@email.com

Press enter and write the subject of your email. Use Ctrl+D to continue.
You will be asked if you want to mark a copy of the mail to any other address - you can skip that with Ctrl+D.
The email will now be sent to your chosen address.

