Home > bash > mutt – Send e-mail as html instead of plain text.

mutt – Send e-mail as html instead of plain text.

$cat message.html | mutt -e "set content_type=text/html" -s "RE: Sample Message" user@domain.com

You need to install and configure mutt for this to work. Below is a sample .muttrc file.

set from="User <user@gmail.com>"
set imap_user=user@gmail.com
set imap_pass=<password>
set folder=imaps://imap.gmail.com
set spoolfile=imaps://imap.gmail.com/INBOX 
set record=imaps://imap.gmail.com/Sent
set postponed=imaps://imap.gmail.com/Drafts
set header_cache=~/.mutt_cache
set smtp_url="smtps://user\@gmail.com:<password>@smtp.gmail.com/" 

UPDATE:
The above .muttrc configuration may not work. If it fails try the below:

set imap_user = "username@gmail.com"
set imap_pass = "password"

set smtp_url = "smtp://username@smtp.gmail.com:587/"
set smtp_pass = "password"
set from = "username@gmail.com"
set realname = "Your Real Name"

set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed="+[Gmail]/Drafts"

set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates

set move = no

Source:
http://shreevatsa.wordpress.com/2007/07/31/using-gmail-with-mutt-the-minimal-way/

Advertisements
Categories: bash Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: