We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issue when sending a draft email created with Aspose.Email


when I send an email created in my Outlook directly everything works fine. When I send a draft email created with Aspose.Email the sender is not displayed in Outlook. It says only “From: on behalf of” although the email is send correctly. I compared the properties of the emails and those are different. See the enclosed attachment. Can you tell me what is the cause of this issue? It seems to happen only with the Exchange server.

This is how we create the message:

MailMessage message = new MailMessage();

MapiMessage mapiMsg = MapiMessage.fromMailMessage(message);
mapiMsg.setMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT | MapiMessageFlags.MSGFLAG_FROMME);

Thanks in advance for any help.

Mariusz Pala

Hi Mariusz,

Sorry for a delayed response.

I can observe this issue, as you mentioned, at my end as well, but I am not sure about the reason of this issue. For further investigation, I saved a draft message using Aspose.Email and then sent it by opening it from outlook. To mention, my outlook is configured with my Exchange Server account. In the attached screenshot, you can see that the “From” field value for the sent item in outlook is “On behalf of”, but if I open the same sent item from Web Access of Exchange Server, you can see that the “From” field is displayed fine.

I am investigating this issue further and will share my findings soon with you after discussing this issue with our development team.

Thank you, I appreciate your help.

Hi Mariusz,

We have investigated this issue further and it seems to be related to the connection between Outlook and Exchange server rather than Aspose.Email. Could you please try setting the MapiPropertyTag.PR_SENDER_ADDRTYPE_W and MapiPropertyTag.PR_SENT_REPRESENTING_ADDRTYPE_W values to “EX” and see if this solves your issue, as setting these properties show the sender name in outlook properly at my end. Please let us know your feedback then.

I wish I could, but I personally don’t have Exchange and our customer will not replace anything in production :slight_smile: Anyway, the email is generated on the server which does not know whether the user uses Exchange or not so we can’t set it to EX as it might work just for some users after all.

Hi Mariusz,

I am afraid but there is no other method available to handle this case in light of discussion with the development team. If there will be anything that could be helpful to you in this case, I’ll update you via this thread. We appreciate your understanding in this regard.