Archived Forum Post

Index of archived forum posts

Question:

email body content is sent as an attachments(ATT00001.htm)

Feb 28 '17 at 12:00

When sending the mail using chilkat.net Mailman, The email body content is sent as an attachments(ATT00001.htm) . On analysis it is due to Microsoft exchange server issue which convert the body content to attachment only when the email has any attachments.

As per the below solution the body content should be set as First before the attachments(hope so in mime file). https://support.microsoft.com/en-gb/help/969854/the-body-of-a-message-is-shown-incorrectly-as-an-attachment-if-you-try-to-use-an-application-in-an-exchange-server-environment-to-send-a-message-that-includes-attachments

below is the .net code used to send the mail.

Email.AddFileAttachment(ImagePath) Email.SetHtmlBody(Htmlcontent) Mailman.SendEmail(Email);

how to achieve this or any other solution to avoid the body content as attachments.

Thanks in Advance Rajesh


Answer

If you update to the latest version of Chilkat it should resolve the problem.

Another solution is to change the order -- call SetHtmlBody first, then AddFileAttachment. (You're likely using an older version where the order mattered.)