Login or register    

Send an html mail from mutt on cli

Set your from address:

export EMAIL='foxhop.net <no-reply@foxhop.net>'

Send an html email body, with a subject, and and attachment to one recipient:

mutt -e 'set content_type=text/html' -s 'subject' -a path/to/attachment.jpg -- email@example.com < body.html

Set envelope sender to pass AWS verify sender checks:

export EMAIL=my.verified.sender@example.com
echo "Hello from `hostname`" | \
mutt \
   -e "my_hdr From:$EMAIL" \
   -e "set from=$EMAIL" \
   -e "set use_envelope_from=yes" \
   -s "Hello from `hostname`" \
   -- my.inbox@example.com


Leave a comment

Please login or register to leave a comment!