![]() |
"From" field extraction
In Outlook 2003, is it possible to programmatically read the "From" field of
a MailItem BEFORE the e-mail is sent out? I've written a new "Send" utility and I noticed that the From field properties are not visible until after the e-mail has been sent. I've tried saving it in Exchange to the Drafts folder, I've tried saving it to the C:\ drive as a MSG file, but nothing. "From" is simply NULL. Any ideas? Thanks, Doug |
"From" field extraction
In theory, yes. If the user has not explicitly set the Account drop down
prior to clicking Send, it will be the same as Namespace.CurrentUser. Otherwise you can read a couple of named propeties using MAPI (C++/Delphi), then use the IOlkAccountManager to find the corresponding account and read the name and address of that account. Outlook 2007 exposes the account used to send the message through the MailItem.SendUsingAccount property. plug Redemption exposes RDOMail.Account property (works in Outlook 2002 and up) - see http://www.dimastr.com/redemption/rd...htm#properties and http://www.dimastr.com/redemption/rdo/RDOAccount.htm /plug Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "DG" wrote in message ... In Outlook 2003, is it possible to programmatically read the "From" field of a MailItem BEFORE the e-mail is sent out? I've written a new "Send" utility and I noticed that the From field properties are not visible until after the e-mail has been sent. I've tried saving it in Exchange to the Drafts folder, I've tried saving it to the C:\ drive as a MSG file, but nothing. "From" is simply NULL. Any ideas? Thanks, Doug |
"From" field extraction
Thank you Dmitry! That should get me in the right direction.
"Dmitry Streblechenko" wrote: In theory, yes. If the user has not explicitly set the Account drop down prior to clicking Send, it will be the same as Namespace.CurrentUser. Otherwise you can read a couple of named propeties using MAPI (C++/Delphi), then use the IOlkAccountManager to find the corresponding account and read the name and address of that account. Outlook 2007 exposes the account used to send the message through the MailItem.SendUsingAccount property. plug Redemption exposes RDOMail.Account property (works in Outlook 2002 and up) - see http://www.dimastr.com/redemption/rd...htm#properties and http://www.dimastr.com/redemption/rdo/RDOAccount.htm /plug Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "DG" wrote in message ... In Outlook 2003, is it possible to programmatically read the "From" field of a MailItem BEFORE the e-mail is sent out? I've written a new "Send" utility and I noticed that the From field properties are not visible until after the e-mail has been sent. I've tried saving it in Exchange to the Drafts folder, I've tried saving it to the C:\ drive as a MSG file, but nothing. "From" is simply NULL. Any ideas? Thanks, Doug |
All times are GMT +1. The time now is 07:07 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com