A customer is getting some emails that are causing service timeouts because MailMessage.Save has really long run times (over 3 minutes). Testing a variety of similar / typical emails from the customer ranging in size from less than 200KB to over 5000KB and 1 to 14 PDF attachments, they all seem to be able to run under 1 second. Occasionally an email comes through that’s less than 2000K but takes 3 to 4 minutes for the Save call to complete.
If I forward the message it saves in 2 or 3 seconds which is still longer than most other messages at sub second times but fast enough to not cause any problems. I did notice the Content-Type changed from…
Content-Type: application/ms-tnef; name=“winmail.dat”
Content-Transfer-Encoding: binary
…to…
Content-Type: multipart/mixed;
…on the forwarded email. Other customer messages are a mix of these.
In researching I came across this post:
API hangs on converting MSG to MHTML (C# .NET)
…which seems similar. I used the code from this post to test my issue and I can reproduce the behavior. I tested this against Aspose.Email versions 20.6, 20.7 and 20.8 and the same problem exists in all.
I have a test solution to demonstrate the problem which is similar to the code from the post mentioned above but it requires specific messages to reproduce the behavior. I can supply these to Aspose upon request.
Is this a bug? What’s special about this message that causes this behavior?
Thanks for any help,
Karl