Need to know account/address outgoing mail sent from

Add-in Express™ Support Service
That's what is more important than anything else

Need to know account/address outgoing mail sent from
 
Roger Levy




Posts: 5
Joined: 2017-03-28
For an Outlook 2003+ add-in, I need to know the "From" address that the user currently writing the email has selected. From documentation, it appears that the MailItem.Sender property provides this information but it is only available starting with 2010. To be clear, my need is to get this information from mail that is being composed and will soon be outgoing. It seems that most of the properties that deal with "senders" have Nothing values in this case and presumably they have useful values for received MailItems.
Posted 07 Apr, 2017 23:01:31 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Roger,

Outlook 2003 doesn't provide support for this task. You could use Namespace.CurrentUser but this is only okay if you have a single account. I would check if Outlook Redemption provides a way to achieve this. Another option is to use Extended MAPI.

In Outlook 2007 and above, you can retrieve the Account used to send the email via MailItem.SendUsingAccount and read Account.SmtpAddress.


Andrei Smolin
Add-in Express Team Leader
Posted 10 Apr, 2017 10:07:39 Top