User Tools

Site Tools


tips:openbsd:mailcommand

Differences

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

Link to this comparison view

tips:openbsd:mailcommand [2011/03/14 17:48] (current)
mattieu created
Line 1: Line 1:
 +====== Send basic e-mail with mail(1) ======
 +===== Send e-mail in shell scripts =====
 +mail(1) usage:
 +<code>-s subject Use subject for the e-mail title
 +-c address Send copy of the mail to the specified address
 +-b address Send blind carbon copy to specified address</code>
  
 +Send a file to root:
 +<code bash>$ mail -s "TODO list" root < todo.log</code>
 +===== Attach files with uuencode(1) =====
 +Send a binary file:
 +<code bash>$ uuencode brimbelle.jpeg brimbelle.jpeg | mail matt@home.com</code>
 +
 +Send multiple files:
 +<code bash>(cat text_to_send.txt ; uuencode brimbelle.jpeg brimbelle.jpeg) | mail matt@home.com</code>
 +~~NOTOC~~
tips/openbsd/mailcommand.txt ยท Last modified: 2011/03/14 17:48 by mattieu