« Return to all random blog posts

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

 

 

Comments:
Show comments