Posts

Showing posts from January, 2016

mail

Use the apt-get command to install it $ apt-get install mailutils to send an email to someone@example.com. The s option specifies the subject of the mail followed by the recipient email address. $ mail -s "Hello World" someone@example.com The above command is not finished upon hitting Enter. Next you have to type in the message. When you're done, hit 'Ctrl-D' at the beginning of a line $ mail -s "Hello World" someone@example.com Cc: Hi Peter How are you I am fine Good Bye <Ctrl+D> To specify the message body in just one line of command use the following style $ mail -s "This is the subject" somebody@example.com <<< 'This is the message' The mail command can be used to read mails. Just run it without an options and it would list all the mails in your inbox $ mail