Email Component vs. MIME (S/MIME) Component

Question:

That is awesome, thank you VERY much. Doing this, would I also be able to use your Email component for attachments / etc. If so, I’m assuming I would need to get licenses for both of these components. Is the MIME components sealed, or can I inherit it to create wrappers for building these headers.

Answer:

The connection between the email component and the MIME component is in the email.GetMime, email.GetMimeObject, email.SetFromMimeText, and email.SetFromMimeObject methods. The intent is that the Email component should be able to handle 99% of email needs - HTML emails with embedded images, style sheets, etc., attachments, custom header fields, etc.. The email component automatically structures the email MIME based on what you want. For example, if you set the plain-text body, and then call AddHtmlAlternativeBody, the email component automatically transforms the MIME into a multipart/alternative. If you then add an embedded image to the HTML, the email component automatically transforms the underlying MIME to the properly nested multipart/alternative and multipart/related nested MIME. The same goes for attachments. You can add attachments at any point, and the email component transforms the MIME by adding the multipart/mixed MIME infrastructure. It doesn't matter if multipart/alternative and/or multipart/related MIME message parts already exist, the email component puts it all together in the proper way so you don't have to think about it.

(The same goes for S/MIME: Chilkat Email is capable of signing and encrypting emails, or verifying signatures and decrypting without needing the S/MIME component. However, if your S/MIME needs are beyond normal email uses, you would want to use the S/MIME component in a more low-level way.)

Of course, you may want your MIME to be explicitly structured in a non-standard way, or in ways that are outside what most email users need. In your case, with RosettaNet, you want to construct a MIME message according to a specific format. You can do that with Chilkat Mime, and then transform that MIME into an email object, add attachments, header fields, etc. and send the email.