<<< Date Index >>>     <<< Thread Index >>>

Re: using mutt to send html mail



Kevin Coyner wrote:
> Yeah I know it sounds funny to even bring this up as a topic.  I've
> been using mutt for several years and haven't missed html mail for
> even a second.
> 
> But, I have a client that wants to send html (with images) emails
> to his customers, and wants me to send them.
> 
> So the question is, can I use mutt?

Hmm...  Probably.  But it does not seem to be the right tool for the
job.  So I would probably do something different.

> Here's what I've tried:
> 
> 1.  Compose, outside of mutt, a simple html file with some sample
> colored text, etc.  Also include in this an image.
> 
> 2.  Open mutt, start composing message, leave body empty.
> 
> 3.  Attach the simple html file that I created in step 1.
> 
> 4.  Highlight the html file and toggle it from A (attached) to I
> (inline) with ^D.
> 
> 5.  Attach the image that has an 'img src' tag in the html file from
> step 1.
> 
> 6.  Send.

That would have been my best shot at it too.  But that won't be
enough.

> Using gmail on the receiving end, the procedure above does work to
> an extent.  The email does show the colored fonts, etc.  But the
> image always shows up as a separate attachment.  I haven't been able
> to get it to show up in the body of the html message.  Note that
> I've tried toggling the image with ^D to both inline and attachment.

What you really want is to send the HTML as a multipart/mixed message
(with a text version along with it), not as a "Content-Disposition:
inline".  This is why you are always seeing it as an attachment.

> Would appreciate any thoughts.
> 
> I tried using Evolution for this, but unfortunately it does not let
> you hard code the selection of a font face into the message.  And I
> just can't bring myself to using OE for this task, even though it
> might just do the job.

I sympathize.  But sometimes you have to be pragmatic about this.  And
if you have already given into the evils of html mail then what is one
more indiscretion?

If I were to stoop to the depths of sending html mail I would probably
write a script to create a message file in the format that I wanted to
send it and then sending it directly with sendmail as suggested by
another poster.

  sendmail -t < messagefile

Bob