Determine the 'e-mail account' of a mailmessage

Determine the 'e-mail account' of a mailmessage

Post by U3ZlbiBEZS » Sat, 15 Jul 2006 16:14:02


Hello all,

I'm trying to determine the 'e-mail account' which was used to receive a
mail message. I know the property is available, since I can add it to my
view, but I need to access it programatically (and if possible even modify
it).

Any help would be welcome.

Thanks.
--
Sven De Bont - MCAD
 
 
 

Determine the 'e-mail account' of a mailmessage

Post by Ken Slovak » Sat, 15 Jul 2006 22:17:46

You can use To or ReceivedByName in the Outlook object model, but both may
just be alias names and not the actual email address. You could access the
Recipients collection and check the Address property of each recipient, but
there could be more than 1 recipient of course.

The actual MAPI property you would need would be
PR_RECEIVED_BY_EMAIL_ADDRESS (0x0076001E), which could be accessed using CDO
1.21 or Extended MAPI or a MAPI wrapper such as Redemption.

--
Ken Slovak
[MVP - Outlook]
http://www.yqcomputer.com/
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.yqcomputer.com/

 
 
 

Determine the 'e-mail account' of a mailmessage

Post by U3ZlbiBEZS » Sat, 15 Jul 2006 23:29:02

It's not the sender I'm after, it's the e-mail account (pop3, imap,
exchange,.. that you configure using 'tools - e-mail accounts') that was used
to retrieve the mail.

You can add that column to your view, but there's no property for it on the
MailItem object.

--
Sven De Bont - MCAD
 
 
 

Determine the 'e-mail account' of a mailmessage

Post by Ken Slovak » Tue, 18 Jul 2006 23:08:05

In a received email the To field is who the item was sent to.

The only way to do what you want is what I posted. Other than that you're
out of luck. You cannot use the Outlook object model to do what you want, as
I mentioned.

--
Ken Slovak
[MVP - Outlook]
http://www.yqcomputer.com/
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.yqcomputer.com/
 
 
 

Determine the 'e-mail account' of a mailmessage

Post by Michael Ba » Wed, 19 Jul 2006 01:35:16

Am Mon, 17 Jul 2006 10:08:05 -0400 schrieb Ken Slovak - [MVP - Outlook]:

What is about 0x8580 (account name) and 0x8581 (account number and e-mail
address)? But they aren accessable via OOM, of course.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


as
 
 
 

Determine the 'e-mail account' of a mailmessage

Post by Ken Slovak » Wed, 19 Jul 2006 02:59:53

Those could also be used I guess, but again none of those are available from
the OOM.

--
Ken Slovak
[MVP - Outlook]
http://www.yqcomputer.com/
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.yqcomputer.com/
 
 
 

Determine the 'e-mail account' of a mailmessage

Post by U3ZlbiBEZS » Sat, 26 Aug 2006 21:52:02

I ended up using redemption to retrieve and modify the value.

Sorry for the late feedfack and thanks for the help

--
Sven De Bont - MCAD