Create Mail Sender Object

Viewed 6782

I am creating an Email Object in Outlook 2013, but I cannot find how to create the Sender object. I am using this code:

Outlook.MailItem mail = (Outlook.MailItem)
         Globals.ThisAddIn.Application.CreateItem(Outlook.OlItemType.olMailItem);
mail.To = "mail@gmail.com"
mail.Sender = // What goes here?
mail.Subject = "Mail subject";

The Sender object is an implementation of the Outlook.AddressEntry interface, so there must be an implementation somewhere, but where? Is it possible to create this Sender object?

BTW, the sender of the email is not necessary an account registered in Outlook, so I cannot use the mail.SendUsingAccount property for that.

2 Answers
Related