UNIX SHELL: send a mail with an attachment
So, i found an old tips, and i wanted to write here.
To send a mail with an attachment, with the plain old mail command:
you need:
uuencode
gzip
mail
General Form:
uuencode <binary_file> | mail -s"Subject" <recipient>
Example:
gzip -c9 2308cc1fi02.dat |\
uuencode cc1fi02.dat.gz |\
mail -s "My Import File" samplemail@domain.com
6U
![](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uGfD6fhYK3vZoGihsIEqNb9SakyVchz3qjRCB-bU2T7qBRiZHQhDhzMxvemJXa_DOVSSJ8NZ7cWQULHikx9CynDEtl6HH6uIGgKVp4Pgpjh05Ek6JQ8WI8eDckNzKi0XiEQz1njQvEinlAZXc=s0-d)
So, i found an old tips, and i wanted to write here.
To send a mail with an attachment, with the plain old mail command:
you need:
uuencode
gzip
General Form:
uuencode <binary_file> | mail -s"Subject" <recipient>
Example:
gzip -c9 2308cc1fi02.dat |\
uuencode cc1fi02.dat.gz |\
mail -s "My Import File" samplemail@domain.com
6U
No comments:
Post a Comment