chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] hato multipart/alternative


From: Andy Bennett
Subject: [Chicken-users] hato multipart/alternative
Date: Fri, 05 Apr 2013 01:30:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.9) Gecko/20121014 Icedove/10.0.9

Hi,

Can anyone offer guidance on how to send a multipart/alternative mail
with hato? I'm trying to send HTML mail with a text/plain alternative.

For my proof of concept I tried:

-----
(send-mail From:    "Pat Andrews <address@hidden>"
           To:      "Andy Pandy <address@hidden>"
           Subject: "Hato Test"
           Charset: "ISO-8859-1"
           Attachments: '((Body: "Hello this is the first attachment")
                          (Body: "This is the second attachment")))
-----

This results in a multipart mail where both parts show up in my mail reader.

I then tried:

-----
(send-mail From:    "Pat Andrews <address@hidden>"
           To:      "Andy Pandy <address@hidden>"
           Subject: "Hato Test"
           Charset: "ISO-8859-1"
           Content-Type: "multipart/alternative"
           Attachments: '((Body: "Hello this is the first attachment")
                          (Body: "This is the second attachment")))
-----

This results in a rather corrupt message where the whole body of the
message appears in the mail reader, including all the MIME Multipart stuff.


hato seems to generate MIME messages with a single boundary string.

It looks like multipart/alternative requires a second boundary string
such that the message contains a single multipart/alternative part which
itself contains MIME parts for the alternatives thus:


------=_Part_2817384_1209246488.1365015903578
Content-Type: multipart/alternative;
        boundary="----=_Part_2817385_902651438.1365015903578"

------=_Part_2817385_902651438.1365015903578
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64

First alternative...

------=_Part_2817385_902651438.1365015903578
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: base64

Second alternative...

------=_Part_2817385_902651438.1365015903578--

------=_Part_2817384_1209246488.1365015903578

...further parts, attachments, etc.



Is there any code that will generate this or will I have to write it myself?

Can anyone offer any guidance on how to best go about it?


Many thanks.




Regards,
@ndy

-- 
address@hidden
http://www.ashurst.eu.org/
0x7EBA75FF




reply via email to

[Prev in Thread] Current Thread [Next in Thread]