User Tools

Site Tools


ubuntu:email:sending_a_mail_in_the_shell

Ubuntu - Email - Sending a mail in the shell

mail -s 'subject' -c 'cc-address' -b 'bcc-address' 'to-address'

Press CTRL+D you are finished writing the mail.


Example

# mail the text that was piped to mail
echo "mail text" | mail john@example.com -s "subject text"
 
# mail the file content
cat list.txt | mail john@example.com -s "sample subject"
ubuntu/email/sending_a_mail_in_the_shell.txt · Last modified: 2020/07/15 10:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki