Script to change account based on recipient?

C

CvT

hi.
I have been searching for this and have found several things that nearly
do what i want, but not quite.

I was wondering if there is a way to change the default account based on
a set of recipient domains. I have about 5 email accounts (i am a
freelancer and need to adopt emails from various domains) and if i want
to make sure that all emails that are sent to people with the domain
abc.com (or whatever), then it uses a particular account.

I have looked at the rules and you can use the outgoing rules but it
does not allow you to set the account for the mail (grr). I guess it
would need an applescript to do change the account. I tried to use the
following:

tell application "Microsoft Entourage"
set account to POP account "AC Mail"
end tell

[AC mail is an account name] but this does not change it over. I am not
an applescripter and this is as far as i can go!

WOuld anyone be able to help me with this? I would be greatly obliged

C
 
P

Paul Berkowitz

I have been searching for this and have found several things that nearly
do what i want, but not quite.

I was wondering if there is a way to change the default account based on
a set of recipient domains. I have about 5 email accounts (i am a
freelancer and need to adopt emails from various domains) and if i want
to make sure that all emails that are sent to people with the domain
abc.com (or whatever), then it uses a particular account.

I have looked at the rules and you can use the outgoing rules but it
does not allow you to set the account for the mail (grr). I guess it
would need an applescript to do change the account. I tried to use the
following:

tell application "Microsoft Entourage"
set account to POP account "AC Mail"
end tell

[AC mail is an account name] but this does not change it over. I am not
an applescripter and this is as far as i can go!

WOuld anyone be able to help me with this? I would be greatly obliged


Check out "Other Account X" script at

MacScripter.net <http://macscripter.net/scriptbuilders/>

You may need to get a few copies and rename some to be able to use it for
several different sets of accounts.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
C

CvT

Paul said:
I have been searching for this and have found several things that nearly
do what i want, but not quite.

I was wondering if there is a way to change the default account based on
a set of recipient domains. I have about 5 email accounts (i am a
freelancer and need to adopt emails from various domains) and if i want
to make sure that all emails that are sent to people with the domain
abc.com (or whatever), then it uses a particular account.

I have looked at the rules and you can use the outgoing rules but it
does not allow you to set the account for the mail (grr). I guess it
would need an applescript to do change the account. I tried to use the
following:

tell application "Microsoft Entourage"
set account to POP account "AC Mail"
end tell

[AC mail is an account name] but this does not change it over. I am not
an applescripter and this is as far as i can go!

WOuld anyone be able to help me with this? I would be greatly obliged



Check out "Other Account X" script at

MacScripter.net <http://macscripter.net/scriptbuilders/>

You may need to get a few copies and rename some to be able to use it for
several different sets of accounts.

Paul - as always thank you. One thing i forgot to mention is that i
frequently need to add email addresses and the problem is that Other
Account X will only x-reference addresses in the Address Book. If
someone says "send an email to Jo Bloggs at this address" then i need to
add it to the category for the script to work. When i use a rule based
on domain name, then i dont have to worry about this.

Is there something missing in the applescript that prevents the outgoing
message to be changed?

Many thanks
 
Top