Re: Sending Email from AppleScript Without Garbling It
Re: Sending Email from AppleScript Without Garbling It
- Subject: Re: Sending Email from AppleScript Without Garbling It
- From: "Simon Kornblith (Mailing Lists)" <email@hidden>
- Date: Tue, 04 Jun 2002 16:39:55 -0400
On 6/4/02 12:34 PM, "Paul Berkowitz" <email@hidden> wrote:
>
I'd be extremely surprised Entourage it doesn't comply with every RFC that
>
exists. Really, if it doesn't, they will want to know about it and will
>
change. Write me off-list with more details and I'll pass them on, and let
>
you know what reply I get. They absolutely want to adhere to all RFC
>
standards, and are pretty meticulous about doing so, even when other email
>
apps don't. (They even take a "hard-line" interpretation about not allowing
>
messages with BCC recipients only - you can't do that in Entourage.)
When composing a new message on its own, it is 100% RFC compliant. The
problem is that when I give it my PGP/MIME source, it doesn't recognize it
as a MIME message, or perhaps it doesn't recognize multipart/encrypted as a
valid MIME type. Either way, it tries to fix this by adding its own MIME
headers and boundaries, and playing with my various different MIME parts,
but this just ends up messing everything up.
>
In the meantime, you can work around this if you need to by parsing the
>
headers and message source, removing what you don't want, copying the rest
>
to a variable and making that the source of a new message, and deleting the
>
original.
No, you don't understand. The problem is that I have composed the message
source in AppleScript, headers and all. It works perfectly if I send it by
interfacing the server directly in Telnet (which won't accept stdin). For
example, the source of a message might be:
User-Agent: Microsoft-Entourage/10.1.0.2006
Date: Tue, 04 Jun 2002 16:25:27 -0400
Subject: Encrypted Message
From: "Simon Kornblith (Personal)" <email@hidden>
To: Simon Kornblith <email@hidden>
Message-ID: <B9229A77.45B9%email@hidden>
Mime-version: 1.0
Content-type: multipart/encrypted; protocol="application/encrypted";
boundary="=--"
--=--
Content-type: application/pgp-encrypted
Version: 1
--=--
Content-Type: application/octet-stream
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.0.7 (Darwin)
[...]
-----END PGP MESSAGE-----
--=----
Then I would do something like:
tell application "Microsoft Entourage" to send (make new outgoing message
with properties {source:newSource})
Unfortunately Entourage mangles this message before sending it, not
recognizing that it has its own perfectly valid (AFAIK) MIME headers.
Instead of that, I end up with:
Return-Path: <email@hidden>
Delivered-To: email@hidden
Received: from server01.oberlin.net (server01.oberlin.net [216.111.184.2])
by simonster.com (Postfix) with ESMTP id F3EA0196
for <email@hidden>; Tue, 4 Jun 2002 15:35:03 -0400 (EDT)
Received: from [192.168.1.22] (ip-246-230.oberlin.net [216.207.246.230])
by server01.oberlin.net (8.12.1/8.12.1) with ESMTP id g54KZ3uL010581
for <email@hidden>; Tue, 4 Jun 2002 16:35:04 -0400 (EDT)
User-Agent: Microsoft-Entourage/10.1.0.2006
Date: Tue, 04 Jun 2002 16:25:27 -0400
Subject: Encrypted Message
From: "Simon Kornblith (Personal)" <email@hidden>
To: Simon Kornblith <email@hidden>
Message-ID: <B9229A77.45B9%email@hidden>
Mime-version: 1.0
Content-type: multipart/encrypted; protocol="application/encrypted";
boundary="=--"
Content-type: multipart/mixed; boundary="B_3106053309_108329"
>
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--B_3106053309_108329
--=--
Content-type: application/pgp-encrypted
Version: 1
--=--
Content-Type: application/octet-stream
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.0.7 (Darwin)
[...]
-----END PGP MESSAGE-----
--=----
--B_3106053309_108329
User-Agent: Microsoft-Entourage/10.1.0.2006
Date: Tue, 04 Jun 2002 16:25:27 -0400
Subject: Encrypted Message
From: "Simon Kornblith (Personal)" <email@hidden>
To: Simon Kornblith <email@hidden>
Message-ID: <B9229A77.45B9%email@hidden>
Mime-version: 1.0
Content-type: multipart/encrypted; protocol="application/encrypted";
boundary="=--"
--=--
Content-type: application/pgp-encrypted
Version: 1
--=--
Content-Type: application/octet-stream
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.0.7 (Darwin)
[...]
-----END PGP MESSAGE-----
--=----
--B_3106053309_108329
User-Agent: Microsoft-Entourage/10.1.0.2006
Date: Tue, 04 Jun 2002 16:25:27 -0400
Subject: Encrypted Message
From: "Simon Kornblith (Personal)" <email@hidden>
To: Simon Kornblith <email@hidden>
Message-ID: <B9229A77.45B9%email@hidden>
Mime-version: 1.0
Content-type: multipart/encrypted; protocol="application/encrypted";
boundary="=--"
--=--
Content-type: application/pgp-encrypted
Version: 1
--=--
Content-Type: application/octet-stream
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.0.7 (Darwin)
[...]
-----END PGP MESSAGE-----
--=----
--B_3106053309_108329--
(No, I did not paste that three times, that's really what Entourage sends).
I think mine is RFC compliant, but if it's not, could you tell me what I did
wrong?
>
You do have to be careful: I have discovered a bug that Entourage
>
gives a false negative when searching for a search string in a longer
>
string if it is found beginning after character 1 and ending after character
>
255. There are ways of working around this bug. When searching with TIDs for
>
"Content-type: multipart/mixed;" you'd need to watch out for this.
Don't even get me started about what I had to do to handle my 500K
strings...
Thanks,
Simon
--
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
-- Benjamin Franklin, Letter to Josiah Quincy, Sept. 11, 1773.
Those who desire to give up freedom in order to gain security will not have,
nor do they deserve, either one.
-- President Thomas Jefferson
To those who scare peace-loving people with phantoms of lost liberty, my
message is this: your tactics only aid terrorists.
-- John Ashcroft
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.