Re: Vacation Mail script
Re: Vacation Mail script
- Subject: Re: Vacation Mail script
- From: Andreas Amann <email@hidden>
- Date: Thu, 25 Mar 2004 20:49:49 -0800
Unfortunately, and unlike other email programs such as the late
lamented Claris Emailer, the sender is plain text, without
distinguishing between the sender's name and email address, so I have
to parse out the address itself.
Well, if you are using 10,3 or higher, you can simply use
--
tell application "Mail" to set email_sender to extract address from
sender_string
--
Furthermore, in order not to have duplicate addresses in the group and
have the group grow beyond control you probably might want to check
whether the address is already present:
--
on add_to_list(email_sender)
tell application "Address Book"
if (count of (people of group "Vacation" whose value of emails
contains email_sender)) = 0 then
set the newbie to make new person at after the people of group
"Vacation"
make new email at after the emails of the newbie with properties
{label:"Vacation", value:email_sender}
save addressbook
end if
end tell
end add_to_list
--
Andreas
_______________________________________________
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.