Discussion:
setting content type in email header with mutt
Donna Koenig
2002-03-25 16:39:39 UTC
Permalink
I need help. Is there an option in mutt (muttrc) to set the content
type to multipart/alternative?

Situation is:
We want to send out email that is html, but for those who only
accept or access text email, we wnat them to be able to open the email
also.

Any help would be appreciated.

Donna
Simon White
2002-03-25 18:46:07 UTC
Permalink
This post might be inappropriate. Click to display it.
Sven Guckes
2002-03-25 19:14:33 UTC
Permalink
Post by Donna Koenig
We want to send out email that is html, but for those who
only accept or access text email, we wnat them to be able
to open the email also. Is there an option in mutt
(muttrc) to set the content type to multipart/alternative?
That's DOG ABUSE! We should tell the RSPCA!
Seriously - use a M$ mailer for such things.

Sven [added value with text in HTML? not!]
--
Sven guckes-***@math.fu-berlin.de [mutt-versions] Latest versions:
MUTT http://www.mutt.org/ news:comp.mail.mutt mutt-1.2.5 [000729]
MUTT http://www.math.fu-berlin.de/~guckes/mutt/ mutt-1.3.28 [020313]
MUTT MUTT - *the* mailer for UNIX with color, threading, IMAP+MIME+PGP+POP
Simon White
2002-03-25 19:29:41 UTC
Permalink
Post by Sven Guckes
Post by Donna Koenig
We want to send out email that is html, but for those who
only accept or access text email, we wnat them to be able
to open the email also. Is there an option in mutt
(muttrc) to set the content type to multipart/alternative?
That's DOG ABUSE! We should tell the RSPCA!
Seriously - use a M$ mailer for such things.
Now, I was waiting for someone to be less around-the-houses about it than
me, and it /had/ to be Sven ;-)
--
[Simon White. vim/mutt. ***@mtds.com. GIMPS:55.06% see www.mersenne.org]
/"\ ASCII Ribbon Campaign
\ / Respect for open standards
X No HTML/RTF in email
/ \ No M$ Word docs in email
Shawn McMahon
2002-03-25 20:06:21 UTC
Permalink
Post by Donna Koenig
We want to send out email that is html, but for those who only
accept or access text email, we wnat them to be able to open the email
also.
OK, let me see if I get this right:

You want to send out HTML email, and forge the headers so that it
goes to people who have made a deliberate choice not to receive
HTML email?

Anybody who helps you do that is evil.

Include a text/plain attachment; that's what the RFCs, common sense, and
ethics would call for.
Gary Johnson
2002-03-25 20:23:06 UTC
Permalink
Post by Donna Koenig
I need help. Is there an option in mutt (muttrc) to set the content
type to multipart/alternative?
We want to send out email that is html, but for those who only
accept or access text email, we wnat them to be able to open the email
also.
Any help would be appreciated.
There is no straightforward way that I know of. I'm in a similar
situation where I need to periodically send to a distribution list a
document written in Word and would like to send it with a text/plain
version as multipart/alternative. Nothing I have done to edit the
Content-Type in the header has worked--mutt always changes it back to
multipart/mixed.

The only solution I can think of short of a patch is to set the sendmail
variable something like this:

set sendmail="/home/yourlogin/bin/alt_sendmail -oem -oi"

where alt_sendmail is a shell script containing:

#!/bin/sh
sed '/^Content-Type/s/mixed/alternative/' | /usr/sbin/sendmail "$@"

Of course, you'll need to restore the original value of sendmail if you
want to send any attachments as multipart/mixed.

HTH,
Gary
--
Gary Johnson | Agilent Technologies
***@spk.agilent.com | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |
Rocco Rutte
2002-03-25 23:10:14 UTC
Permalink
Hi,
Post by Gary Johnson
I'm in a similar
situation where I need to periodically send to a distribution list a
document written in Word and would like to send it with a text/plain
version as multipart/alternative. Nothing I have done to edit the
Content-Type in the header has worked--mutt always changes it back to
multipart/mixed.
What about preparing everything to use the '-H' switch? Especially for
the case that you do it automatically and not by hand.

Rocco
Gary Johnson
2002-03-26 08:57:28 UTC
Permalink
Post by Rocco Rutte
Hi,
Post by Gary Johnson
I'm in a similar
situation where I need to periodically send to a distribution list a
document written in Word and would like to send it with a text/plain
version as multipart/alternative. Nothing I have done to edit the
Content-Type in the header has worked--mutt always changes it back to
multipart/mixed.
What about preparing everything to use the '-H' switch? Especially for
the case that you do it automatically and not by hand.
I tried that, too. Mutt ignored the 'Content-Type:
multipart/alternative; boundary="qDbXVdCdHGoSgWSk"' line in the header
and sent the message as one text/plain part.

Gary
--
Gary Johnson | Agilent Technologies
***@spk.agilent.com | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |
Aaron Schrab
2002-03-26 17:58:59 UTC
Permalink
Post by Gary Johnson
Post by Rocco Rutte
What about preparing everything to use the '-H' switch? Especially for
the case that you do it automatically and not by hand.
multipart/alternative; boundary="qDbXVdCdHGoSgWSk"' line in the header
and sent the message as one text/plain part.
If you're generating the entire message, including all the MIME stuff,
yourself what is it that you want mutt to do that isn't handled by just
passing the message directly to sendmail (or equivalent)?

Mutt is a Mail *User* Agent, it's intended to be run by the user not a
script. That it can be used in scripts in some situations is just a
bonus.
--
Aaron Schrab ***@schrab.com http://www.schrab.com/aaron/
And 1.1.81 is officially BugFree(tm), so if you receive any bug-reports
on it, you know they are just evil lies." -- Linus Torvalds
Gary Johnson
2002-03-26 19:54:44 UTC
Permalink
Post by Aaron Schrab
Post by Gary Johnson
Post by Rocco Rutte
What about preparing everything to use the '-H' switch? Especially for
the case that you do it automatically and not by hand.
multipart/alternative; boundary="qDbXVdCdHGoSgWSk"' line in the header
and sent the message as one text/plain part.
If you're generating the entire message, including all the MIME stuff,
yourself what is it that you want mutt to do that isn't handled by just
passing the message directly to sendmail (or equivalent)?
1. Mutt can also save a copy to a folder.
2. The original poster was looking for a way to use mutt to solve her
problem, and since mutt is such a fantastic MUA, and since I have a
similar problem myself, I wanted to find some way to make it work.
It was a challenge.
3. Yes, I could write a script to do this, but being lazy, I was trying
to get mutt to do as much of the work as I could, such as handling
the interface to sendmail.

Gary
--
Gary Johnson | Agilent Technologies
***@spk.agilent.com | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |
Loading...