login about faq

A user of my software reported the following new behavior after upgrading to a newer version (using a more recent ActiveX Chilkat component: If the email message body is left blank, the email server (Office 365) which is set to add a text footer ("This electronic message transmission...") delivers a message with just the text footer and, below that, the original message (with a pdf attachment) shows up as a forwarded message. Is this a recently introduced bug?

asked Dec 21 '16 at 18:54

ixm7's gravatar image


Thanks. I think the question is really: What MIME did Chilkat produce, and how is it different than what was produced before? I wouldn't really consider it a bug because you have two systems handling data with not-well-known semantics.

Regarding an email containing an attachment with no body that has ever been sent: The question is: what MIME should be produced? There are two choices:

1) Produce a multipart/mixed email, having a text/plain body that is empty, with an attachment.


2) Produce a non-multipart email where the body contains the "attachment" data and the Content-Type reflects the attachment (i.e. such as "application/pdf").

Chilkat does #2. This is because there have been many complaints in the past about emails contain empty bodies. In this situation, people overwhelmingly desired choice #2 -- especially when it comes to things like EDI.

So.. I wouldn't call it a bug, but just the fact that one needs to know the semantics in oddball situations, and then also know the semantics of an email server that might be mucking with the email as it's being sent out..


answered Dec 23 '16 at 10:00

chilkat's gravatar image

chilkat ♦♦

Thanks; just so we can understand more fully: did Chilkat recently change the handling of this scenario from option 1 to option 2? This would explain the behavior change we are witnessing.


answered Dec 23 '16 at 10:42

ixm7's gravatar image



My guess is that this is probably the case. To verify, you can call email.GetMime (or SaveEml) just before sending, and compare the MIME produced by one version vs. the other.

(Dec 23 '16 at 10:45) chilkat ♦♦

Also, check to see if explicitly setting the email.Body to the empty string changes the behavior. It may be that Chilkat makes a distinction between an unset body and a set body (w.r.t. empty)

(Dec 23 '16 at 10:47) chilkat ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Dec 21 '16 at 18:54

Seen: 1,081 times

Last updated: Dec 23 '16 at 10:47

powered by OSQA