Friday, April 9, 2010

linux: mutt is so much better than mail

Here's how to send a email from the linux command line, attach files to it, and have it sent to multiple recipients! Much better than having to paste the contents of a config file or text file into the body of an email and then use the plain old "mail" command.

echo | mutt  -s interesting_logs_please_check  -a syslogs.tar.gz admin@domain.org, user1@domain.org, user2@domain.org


references:

http://www.shelldorado.com/articles/mailattachments.html
(excellent)

"Multiple recipients may also be specified by separating each address with the , delimiter"
(tested this and it works)
http://www.freebsd.org/doc/handbook/mail-agents.html

No comments: