chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] hato multipart/alternative


From: Alex Shinn
Subject: Re: [Chicken-users] hato multipart/alternative
Date: Sun, 7 Apr 2013 12:36:38 +0900

Hi Andy,

On Fri, Apr 5, 2013 at 9:30 AM, Andy Bennett <address@hidden> wrote:
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")))
-----

When specifying your own multiple Content-Type, you
need to include the boundary:

  Content-Type: "multipart/alternative; boundary=xyzzy"
  Boundary: "xyzzy"

[Ideally it should infer the boundary in this case, and it
would also be nice to automatically generate the boundary
when unspecified.]

This should prevent everything falling out to the top-level
as you described, though it may not generate quite what
you want.  You can log issues on hato.googlecode.com.
If it's a bug I'll try to fix it, but feature requests will largely
be pending the port to R7RS.
 
hato seems to generate MIME messages with a single boundary string.

Attachments may include nested attachments, which will
result in nested multiparts with different boundaries.  You
should only need one top-level boundary in your case though.

-- 
Alex


reply via email to

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