Re: produce multipart/alternative
On 2005-04-07, Joel CARNAT <joel@xxxxxxxxxx> wrote:
> On Thu, Apr 07 2005 - 23:23, Michelle Konzack wrote:
> > Am 2005-04-07 23:15:32, schrieb Joel CARNAT:
> >
> > > yes, I understood how the plain text mail is suppose to be to be
> > > understood as a "multipart/alternative".
> > > but I just can find a way to tell mutt to generate such a mail from a
> > > given plain text mail.
> >
> > But why not use a small BASH script which do it for you ?
> >
> > macro index <f2> ":set editor=alternative.sh\ne\n:set editor=vim\n"
> >
>
> OK, using a shell script as the editor looks really good :)
>
> > With 'formail' you can change easyly the "Content-Type:" header
> > and the your script must catch the Text from the first empty
> > line to the ende and wrap it with html.
> >
> > I see no problem there.
> >
>
> There aren't - since I know now how to use a script as the editor :)
> Thanks a lot !
Except that the entire message is not available to the editor from
the Compose menu, only from the Index and Pager menus. So, while
you could change "multipart/mixed" to "multipart/alternative" in a
message you have received, you cannot do the same to a message you
are about to send.
Using the editor, that is. However, I think you could put a shell
script wrapper around sendmail, set mutt's sendmail variable to the
name of that script, and have the script use sed or formail to
replace the "Content-Type: multipart/mixed" header with
"Content-Type: multipart/alternative".
You could then use a pair of macros to define the sendmail variable
as needed for normal messages and for your special
multipart/alternative messages.
HTH,
Gary
--
Gary Johnson | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA