Of course, as a programmer we are often face with different challenges every day. The problem faced now is images losing their content when in the CFMAIL. Of course there’s always a solution because ColdFusion always anticipates or adds new tags or components to the language to solve any apparent issue. So, I dedicated constant research to the topic of CFMAIL and how to attach images instead of just linking them. Linking images in CFMAIL has a little side effect. The introduction of CFMAILPARAM enables embedded images in the e-mail, which do not show up as an attachment or an external link.
The following snippet should illustrate how easy it is to embed images into CFML tags.
- subject=”Embedded Image via CFMail”
- <img src=”cid:girl”/><br />
- <img src=”cid:test” width=”350″ height=”261″ alt=”" /><br />
- <!— Embed images. —>