Free Support Forum - aspose.com

Version change from 3.8 to 17.12 gives issues with the Echange server. Error code 0x80070005-0x0004dc-0x000524

Hi Aspose-team

We experiance a weird issue after upgrading Aspose.Email.dll from version 3.8 to 17.12.

We use Aspose.Email to generate some mails to customers with a sender (from) a shared e-mailadress like department@domain.com these are sent either automatically by “the system” or they are prepared for the user to send through Outlook. Either way they are sent through an Exchange server in the cloud.

This worked fine using version 3.8 but after upgrading to 17.12 the Exchange server rejects the mails with the message “This message could not be sent. Try sending the message again later, or contact your network administrator. You do not have the permission to send the message on behalf of the specified user. Error is [0x80070005-0x0004dc-0x000524].”

There are several posts on the net regarding this error message and ways to resolve - for instance this one:
[Issue and several suggestions for solution] (http://www.admin-enclave.com/en/articles/exchange/292-resolved-you-do-not-have-the-permission-to-send-the-message-on-behalf-of-the-specified-user.html)

Are some of these adjustments to the Exchange server needed when we use version 17.12 to create the mails instead of version 3.8?

Or was there some MAPI-headers automatically set by the version 3.8 that we need to add explicitely in version 17.12?

For reference - we made to seemingly harmless and straightforward code changes when changing the version.
A:
image.png (8.4 KB)

B:
image.png (9.7 KB)

The people managing the Exchange-server setup are reluctant to change anything as “It used to work fine” and when a user opens the mail, changes the sender of the mail by selecting the same email from their addressbook they are able to send the mail.

Any hint or help is much appreciated.

Best regards
Jacob

NB There seems to be some relation to this topic (no conclusion there though): Related topic

@Krifa_delegate_jba,

There is no such specific information available w.r.t version 3.8 or 7.12 where changes were required to Exchange Server configurations or MAPI-headers automatically set by the API. We were not able to reproduce the issue earlier as well with the API. Please download the latest version of the API at your end and if the issue persists, please:

  1. Create a sample message file with version 3.8 of API
  2. Create a sample message file with version 17.12 of API
  3. Create a sample message file with version 18.2 of API

and share all of these with us for further investigation at our end.

filedumps.zip (6.6 KB)
Code for unit tests generating the files.zip (1.7 KB)

Hi Kashif/Aspose

I have attached a zip with the three msg-files requested.
The one created with 3.8 can be sent but the two created with the newer versions of aspose.email are rejected by the Exchange server.
The person that tries to send these mails using Outlook has an email address like ‘initials’@Krifa.dk

I have also attached a zip with the code used for the unittests that generated the msg-files.

Kind regards
Jacob

@Krifa_delegate_jba,

We have checked your sample files and all emails are sent out from our Exchange server account configured in MS Outlook. Could you please confirm to us if the problems still exist with the same Exchange server you are currently using? Please also share Exchange Server version installed at your end.

Hi Again.

Please notice that if you open these mails in Outlook, change the sender and/or receiver and then tries to send them it will be fine - even if you choose the same sender-email as the failing mail had. Outlook changes the mail in some way. This is actually what the users must do at the moment as a Work around for the failing mails.
So if you will test this you have to generate the files using the code with emailaddresses changed to match the domain you test it on so that you don’t let Outlook change the mail.

As regards the Exchange server it is Exchange Online:

image.jpg (18.8 KB)

Kind regards
Jacob

@Krifa_delegate_jba,

We tested the issue at our end by repeating the same steps as you have mentioned, but are not able to reproduce the problem. Is it possible for you to provide us with a couple of test accounts on your Exchange server that we can use to reproduce the issue at our end. This will help us investigate the problem and assist you further accordingly.

Thank you for your concern and time.
Account etc supplied in a private message to you now.
Best regards
Jacob

@Krifa_delegate_jba,

We have received your shared information in private message and will update you there with our findings.

The issues you have found earlier (filed as EMAILNET-38957) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by kashif.iqbal

This issue was solved in version 18.4
Release notes

@Krifa_delegate_jba

Yes, the issue was resolved in Aspose.Email for .NET 18.4. Please write back to us if you have any query in this regard.