Title: Checking the User Agent [Was: Re: IE 5.1 and ENTOURAGE]
On 22/12/01 1:31 am, "Paul Berkowitz" <[EMAIL PROTECTED]> wrote:

>> BTW, we need to specify which version of Entourage the question is about.
>
> I really wish people would! I spend most of my time opening up the message
> Sources to check.

I used to do that, so I wrote a little script! Unfortunately, many mailing lists mangle the original User Agent/message id headers, so this doesn't always work :(

tell application "Microsoft Entourage"
    set theMess to item 1 of (get current messages)
    set theHeaders to headers of theMess
    set headerType to "User-Agent: "
    if headerType is not in theHeaders then set headerType to "x-mailer: "
    if headerType is not in theHeaders then set headerType to "Message-id: "
    set theHeaders to the paragraphs of theHeaders
    set theHeader to ""
    repeat with aHeader in theHeaders
        if aHeader starts with headerType then
            set theHeader to contents of aHeader
            exit repeat
        end if
    end repeat
    display dialog theHeader buttons {"OK"} default button 1
end tell

Note that since the script was for my own use I haven’t incorporated any error checking – I’m sure you could put that in if you wanted it <g>

--
Barry Wainwright
<http://www.barryw.net/>


Always borrow money from a pessimist; he doesn't expect to be paid back.

Reply via email to