On 1/19/02 4:00 PM, "Allen Watson" <[EMAIL PROTECTED]> wrote:
> On or near 1/19/02 3:45 PM, Barry Wainwright at [EMAIL PROTECTED] observed:
>
>> At 3:25 pm -0800 19/1/02, Allen Watson Wrote:
>>> (* For some reason, received headers sometimes break into two lines, so
>>> I have to paste them together. Continuation lines start with a space. *)
>>
>> or a tab
>>
>> ;-)
> Oh, pooh! Picky, picky. Okay; after the line doing "my searchReplace", add a
> second line:
>
> set hdrs to my searchReplace(hdrs, (return & tab), " ")
Allen,
I have seen several multiple-item headers where tab must have been set (you
can see it on your own Sent messages to multiple recipients) but which get
converted to 4 spaces when the message is sent. I believe that a lot of
programs convert tabs to spaces when sending to avoid problems if a
receiving client treats tab as some sort of delimiter. Now look for some
Received messages that were sent to multiple recipients by Entourage or
another email client that uses tabs. Stretch out the viewed Source to make
sure you're not dealing with one that doesn't add a carriage return. If you
see subsidiary lines beginning with what look like tabs, put your cursor
there and use the arrow keys. You'll see that, unlike sent messages where it
takes just one press of the arrow key to traverse the tab-gap, it takes 4 or
5 here.
That's why I wrote in my last message about the conversion of tab to
multiple spaces, which I guess you didn't notice. Your script won't work on
them without something like this\ the following.
I think you need to put something in a repeat loop. After your call to the
searchReplace handler, you need a preliminary repeat loop to get rid of any
more spaces:
set hdrs to every paragraph of hdrs
repeat with i from 1 to (count hdrs)
set aHdr to item i of hdrs
repeat while aHdr starts with " "
try -- might be just a space
set aHdr to text 2 thru -1 of aHdr
end try
end repeat
if aHdr starts with "Received:" then -- etc
--
Paul Berkowitz
--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
archives:
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>