Saturday, April 01, 2006

Sending attachments from a script or Linux CLI

mutt -s SUBJECT -a ATTACHMENT user@domain.com

is a nice way. I like mutt as a mail user agent. It can do pgp and stuff too if you need to.

mailx is another way. I prefer mutt, but now you have at least two ways to send attachments from a linux script or command line.


UPDATE:
A third way posted by anonymous in the comments:

uuencode local_file.name remote_file.name | mail -s "file attachment" user@example.com

if you have uuencode installed and mail, it works very well. Thanks anonymous!

1 comment:

Anonymous said...

uuencode local_file.name remote_file.name | mail -s "file attachment" user@example.com