JHP said:
Maybe I need supply more information?
I am trying to determine if a sent email (from address) belongs to an
existing (visible) mailbox...
Lets say I have multiple accounts (PST files as I already have Exchange
folders working) setup - I want to be able to determine which account the
email was sent from.
I don't want to have to hard-code the folder name (Select Case to match
address to folder) as a (PST) mailbox can be renamed.
I thought of using StoreID but a sent email (Parent.StoreID) takes on the
Default account's ID.
Any help would be greatly appreciated,
I'm still a little unclear as to what you're trying to do. You are talking
about an Outlook profile that is configured to sync with multiple POP3
accounts, correct? It seems like you are inferring that each POP3 account
logically maps to a separate .PST file -- that is not the case. Mail from
all POP3 accounts is delivered to a single Inbox folder in a single .PST.
When you have multiple configured POP3 accounts you may choose which you
want to send from, when composing; by default the from address for a reply
is dictated by the account on which it was received (but it is still
user-selectable.)
If what you want to do is separate the items in Sent Items, according to the
POP3 account from which it was sent, I think you could get that by reading
the PR_SENDER_EMAIL_ADDRESS property (using extended MAPI or Redemption) and
move the item accordingly. But a separate destination corresponding to each
POP3 will not already exist, you'll have to create them yourself (presumably
as folders under Sent Items -- as a user I personally would be disenchanted
by an AddIn that created a bunch of .PST files like that.)
-Mark