Changing from address but not sender account with outlook PropertyAccessor

时间:2017-08-04 12:15:09

标签: email outlook

I am trying to send from a specific outlook account using SendUsingAccount, but then I want to change the From address so it shows a different address to that of the sending account.

So I am doing the following:

Mail.SendUsingAccount := Outlook.session.accounts.item(SenderAccount);
mail.propertyAccessor.SetProperty('http://schemas.microsoft.com/mapi/proptag/0x0C1F001E', senderAddress);
Mail.send

Mail is an olMailItem.

The setProperty function is not raising an exception, however, the from address for the email is being shown as he email address of the sender account.

0 个答案:

没有答案