Sending Mail (with attachments) from a Linux shell

Ever need to send a log file or something to an email address:

for text attachments:

mail -s subject email@address.com < /path/to/my/text.file 

for binary attachments (images etc..)

mutt -s subject -a /path/to/image.jpg email@address.com < /dev/null

Leave a Reply

Your email address will not be published. Required fields are marked *