Re: Vacation Mail script
Re: Vacation Mail script
- Subject: Re: Vacation Mail script
- From: Michelle Steiner <email@hidden>
- Date: Thu, 25 Mar 2004 23:52:46 -0700
On Mar 25, 2004, at 9:49 PM, Andreas Amann wrote:
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
--
Hey, that's great; I didn't know it existed. I wrote the script for
Jaguar, and tested it under Panther, but never noticed that name and
email address can be extracted from the full address.
Unfortunately, the name property of the Address Book contact is read
only; to write a name, you have to parse it into first, middle, last,
title, and suffix. That is not a trivial job because a name can have
anywhere from one to all five of those. (Plus the missing-name case
has to be accounted for.) For example, if the name has two spaces in
it, is that first, middle, and last or title, first and last or first,
last, and suffix?
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:
No need to; the rule checks to see whether it is in the group before
calling the script. If it is in the group, it doesn't run the script,
nor do any of the other actions in the rule.
-- Michelle
--
If you don't hit any bumps in the road, you're not moving.
_______________________________________________
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.