2006/09/01

Send a mail with attachment in Unix

A simple way to send a mail with attachment in Unix. Of course, you can use 'backtick' or 'system call' include it in a Perl code.

cat some_directory/file_a | uuencode filename | mail -s "subject" receiver@emailaddress < some_directory/file_b


Note:
file_a is a file that will be attached
file_b is a file that will be displayed as a message

No comments:

Post a Comment