viernes, 11 de septiembre de 2009

Attach a file to a mail on shell

In the old times we were able to attach a file using the mail command. Now, we can do the same thing using mutt:

$ echo "Mail body" | mutt -s "This is a mail with attachments" -a ~/mi_file.txt -a ~/mi_picture.png anne@octop.us
$ _


We can also use some pre-written file to use as the email body:

$ mutt -s "Mail with body from a file" anne@octop.us < ~/mail_body.txt
$ _

No hay comentarios:

Publicar un comentario