[Alpine-info] Sending multipart/alternative messages from pine?

Lucio Chiappetti lucio at lambrate.inaf.it
Tue Oct 18 01:08:11 PDT 2011


On Mon, 17 Oct 2011, Joshua Miller wrote:


> This is going to sound like a silly request/question, but is there a

> way (even if a bit complex) to send multipart/alternative messages

> from alpine (with one part text/plain, and one text/html).


The question is not silly ... it's the reason :-)


> I've got to deal with a stupid recipient mail server that rejects

> text/plain emails with "invalid body type".


That's actually the *silliest behaviour* I've ever seen !!
Forcing people to use a stupid and redundant e-mail format :-(

Consider that I generally FILTER e-mail I receive in
multipart/alternative, scrubbing out the html part and replacing it with a
one-line placeholder (but I do not delete the original, I store it offline
for a week). All this is done via procmail
http://sax.iasf-milano.inaf.it/~lucio/Procmail/noquotenohtml.html

Anyhow are you really sure they want a full-fledged multipart-alternative,
and not just a body tagged as text/html ? Or the presence of a text/html
attachment ?

In the first case, I'd play with the "Customized Header" in .pinerc adding
a Content-Type (you could even define a Role according to the recipient
address, which generates a customized header pre-filled with Content-Type:
text/html). Then it's up to you whether to write the mail body in plain
text, inserting <p> tags, or just wrapping it all in <pre></pre>.

In the second case just write your normal e-mail and attach (control-J
from main header) ANY html file (my inclination would be to add a
"stupid.html" file which tells them how stupid they are :-) ).

I just tried that, apparently it generates a multipart/mixed message.
I do not believe it is much different from a multipart/alternative (I read
the RFCs long ago, but I was interested in decoding such messages to get
rid of the HTML part, not in encoding them).

I have no idea how easy it would be to generate a real
multipart/alternative. I'm pretty sure I could do it writing the
appropriate stuff (headers, separators and bodies) to a file and sending
it straight with sendmail, but I'm not sure if pine will send a
pre-composed attachment of the correct format without other modifications.

Good luck.

--
------------------------------------------------------------------------
Lucio Chiappetti - INAF/IASF - via Bassini 15 - I-20133 Milano (Italy)
------------------------------------------------------------------------
Citizens entrusted of public functions have the duty to accomplish them
with discipline and honour
[Art. 54 Constitution of the Italian Republic]
------------------------------------------------------------------------
For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html
------------------------------------------------------------------------


More information about the Alpine-info mailing list