Mail commented on by Ryan Gardner (Apr 02, 2009).

Comment:

Sending a multipart/alternative email

Sending a multipart/alternative email is a common way to send both a plain text version and a text/html version of an email at the same time. This allows clients which are not able to render HTML emails to still display the plain text version.

In Camel 1.6.1 you can specify an alternate body to be included setting the header CamelMailAlternateBody on the message prior to sending it. This should be set to a string which contains the plain text version of your email.

Sending mail attachments inline

In some cases, you would like to send your attachments inline. Some mail clients support rendering inline attachments using Content-ID references (see http://www.ietf.org/rfc/rfc2111.txt ) like this:

<img src=""/> when the attached image has a tag "ContentID: 0...@boo.com". To do this in apache camel, name the attachment that you add to the message starting with the prefix "cid:" and configure the exchange to useInlineAttachments=true and the header will be added to the MIME body to specify the "ContentID: [the part after the cid:]" on the attachment to make this work.

If you intend to send inline images and use this method to attach them, be sure to test this on the various email clients you intend to send email to.

Reply via email to