Title: Re: Apple script: How to isolate an email address?
This snippet will extract all the addresses from the email:

set theMess to item 1 of (get current messages)
set theWords to every word of (get content of theMess)
set theAddresses to {}
repeat with x from 1 to count theWords
    if item x of theWords is "@" then copy (items (x - 1) thru (x + 1) of theWords) as text to end of theAddresses
end repeat

‘theAddresses’ will contain a list of all the addresses.

If the email always has the same format as your example you can simply get ‘item 3 of theAddresses’.

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


"I never let schooling interfere with my education."  --  Mark Twain




> From: SVEN AERTS <[EMAIL PROTECTED]>
> Reply-To: "Entourage:mac Talk" <[EMAIL PROTECTED]>
> Date: Thu, 17 Oct 2002 03:11:45 +0200
> To: EntX-Talk <[EMAIL PROTECTED]>
> Subject: Apple script: How to isolate an email address?
>
> I am writing a rule that sends a standard welcome text to the email address
> retained in lower mentioned.  But how do I isolate the email address?
>
> Thank you,
>
> --
> Sven-Brussels
> GSM: +32 (0)485/389679
> EntX-OSX.2.1.Jaguar-IBook-500MHz-640MB SDRAM-14GB HD-Airport-AZERTY Keyboard
>
> ------ Forwarded Message
>> From: Yahoo! Groups Notification <[EMAIL PROTECTED]>
>> Date: 16 Oct 2002 18:08:41 -0000
>> To: [EMAIL PROTECTED]
>> Subject: New yee-general member
>>
>>
>> Hello,
>>
>> This is an automated email message to let you know that
>> yeyeyee2099 <[EMAIL PROTECTED]> joined your yee-general
>> group.
>>
>> Your group is currently configured to send you email
>> notification whenever a new member joins.  To turn off
>> notification, visit
>>
>> http://groups.yahoo.com/group/yee-general/join
>>
>> Thank you for choosing Yahoo! Groups as your email group
>> service for the yee-general group.
>>
>> Regards,
>>
>> Yahoo! Groups Customer Care
>>
>> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>>
>>
>>
>>
>>
>>
>
> ------ End of Forwarded Message
>
>
> --
> 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/>

Reply via email to