1

I am updating an Email using Redemption to set the value of Sender of the Email, so I use this code:

RDOMail rdoMail = Globals.ThisAddIn.session.GetMessageFromID(mail.EntryID);
rdoMail.Sender = //What goes here?

But, I have no idea how to create the RDOAddressEntry to set the Sender property of the Email, any ideas?

Joe Almore
  • 4,036
  • 9
  • 52
  • 77

1 Answers1

1

You need to set it to an instance of the RDOAddressEntry object.

RDOAddressEntry object can be retrieved from another RDOMail object (RDOMail.Sender), RDOSession.AddressBook.ResolveName, or one of the address lists (RDOSession.AddressBook.AddressLists).

You might also want to set the RDOMail.SentOnBehalfOf property (it too needs an instance of the RDOAddressEntry object).

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • OK, seems like I will have to use another method, since the _Sender_ is not actually registered in the _AddressBook_. Do you know any other way to set the `Sender` property of an email in Outlook 2007? This value can be set in Outlook 2010 & 2013, but cannot see how to do the same on 2007. – Joe Almore Dec 28 '13 at 05:08
  • You can call RDOSession.AddressBook.CreateOneOffEntryId and then use the returned one-off entry id to call RDOSession.GetAddressEntryFromId. – Dmitry Streblechenko Dec 29 '13 at 16:11
  • Account.CurrentUser also returns an address entry. – The Muffin Man Jan 13 '15 at 00:30
  • I think the OP wanted to set an arbitrary sender, not just the account user. – Dmitry Streblechenko Jan 13 '15 at 06:49