Sending email with mutt

Simple message with text in the body of the email

mutt -s "Test from domain" user@domain.com < /temp/message.txt

And if you need to send an attachment

mutt -s "Test from domain" user@domain.com < /temp/message.txt -a /temp/file.jpg

This is another way to write the test, having the body in the same line.

echo "This is the body" | mutt -s "Testing mutt" user@domain.com -a /temp/file.jpg

[highlighter line=0]

Leave a Reply

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