1

After installing mailutils on ubuntu 18.04

$sudo apt-get install mailutils

I try to send email manually on CLI

$mail -s test
To: [email protected]
Cc: 

then.... what should I do????

0

1 Answer 1

1

Press enter to get to the next line. It will ask for the mail subject, fill it or press enter to leave it blank. You can start typing your message from the next line. Press Ctrl + D once you're done and your message will be sent.

You can even send mails using a one-liner.

mail -s "mail subject" [email protected] <<< 'your message here'

or from a file

 mail -s "mail subject" [email protected] < /home/user/mail.txt

Just make sure your psotfix/ssmtp configuration is alright.

1
  • Thank you very much !! it works well for me.
    – whitebear
    Commented May 3, 2020 at 6:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .