adding Content-Type header by defaults plist

Darin Duphorne darind at houston.rr.com
Sun Jun 29 07:23:23 PDT 2003


To try and trick Mail.app into letting me create a html newsletter, I 
added "MIME-Version: 1.0" and "Content-Type: 
multipart/mixed;boundary=unique-boundary-1" headers in the defaults 
plist, and then used --unique-boundary-1 as my boundary separator in 
the body of the email.  I think this would have worked, but Mail.app 
superceded my default headers with its own (replacing the boundary with 
an unpredictable random string, so I can't use it in the body to 
separate the parts).

I then realized that the default mime type in Mail.app was rich text, 
so I tried making the message plain text before sending it.  It still 
changed the Content-Type, but simply used text/plain this time, and 
still replaced the boundary tag.

GRRRRRRRRRRRRRRR.................

Does anyone have any suggestions, or is this just flat not possible in 
Mail.app? I have a perl script that will format the content, but don't 
want to send it with sendmail -- I want to use Mail.app.

Cricket????

==========================

Here's my sample email body:

This is the preamble area of a multipart message.

Mail readers that understand multipart format

should ignore this preamble.

If you are reading this text, you might want to

consider changing to a mail reader that understands

how to properly display multipart messages.

--unique-boundary-1

...Some text appears here...

[Note that the preceding blank line means

no header fields were given and this is text,

with charset US ASCII.  It could have been

done with explicit typing as in the next part.]

--unique-boundary-1

Content-type: text/plain; charset=US-ASCII

This could have been part of the previous part,

but illustrates explicit versus implicit

typing of body parts.

--unique-boundary-1

Content-Type: multipart/parallel;

boundary=unique-boundary-2

--unique-boundary-2

Content-Type: audio/basic

Content-Transfer-Encoding: base64

... base64-encoded 8000 Hz single-channel

mu-law-format audio data goes here....

--unique-boundary-2

Content-Type: image/gif

Content-Transfer-Encoding: base64

... base64-encoded image data goes here....

--unique-boundary-2--

--unique-boundary-1

Content-type: text/richtext

This is <bold><italic>richtext.</italic></bold>

<smaller>as defined in RFC 1341</smaller>

<nl><nl>Isn't it

<bigger><bigger>cool?</bigger></bigger>

--unique-boundary-1

Content-Type: message/rfc822

From: (mailbox in US-ASCII)

To: (address in US-ASCII)

Subject: (subject in US-ASCII)

Content-Type: Text/plain; charset=ISO-8859-1

Content-Transfer-Encoding: Quoted-printable

... Additional text in ISO-8859-1 goes here ...

--unique-boundary-1-- 



More information about the X-Apps mailing list