User Tools

Site Tools


ubuntu:email:sending_a_mail_in_the_shell

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ubuntu:email:sending_a_mail_in_the_shell [2019/11/27 22:09] – created peterubuntu:email:sending_a_mail_in_the_shell [2020/07/15 09:30] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Ubuntu - Email - Sending a mail in the shell ====== ====== Ubuntu - Email - Sending a mail in the shell ======
 +
 +<code bash>
 +mail -s 'subject' -c 'cc-address' -b 'bcc-address' 'to-address'
 +</code>
 +
 +Press CTRL+D you are finished writing the mail.
 +
 +----
 +
 +===== Example =====
  
 <code bash> <code bash>
 # mail the text that was piped to mail # mail the text that was piped to mail
-echo "mail text" | mail johndoe@example.com -s "subject text"+echo "mail text" | mail john@example.com -s "subject text"
  
 # mail the file content # mail the file content
-cat list.txt | mail johndoe@example.com -s "jar with dependencies"+cat list.txt | mail john@example.com -s "sample subject"
 </code> </code>
 +
ubuntu/email/sending_a_mail_in_the_shell.1574892575.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki