« Keep your mobile phone book online! | Home | FlexiSkin for Nokia N800 »

Sending email with attachment from command line

By Michael Stepanov | May 31, 2007

Recently I needed to send a script to one of my co-workers from the server. One way to do that is copy the script using scp to my PC and send it as usual. But there is a more efficient way to do that with mutt:

$ mutt -s "Subject" -a /tmp/file.tar.gz your@email.addr < /tmp/message-body.txt

I hope that all parameters are understandable. So, having mutt and using that command you can easily send email with attached file from command line.

Topics: |

 RSS feed for comments on this post.

Comments