Skip to main content
Participating Frequently
August 18, 2008
Question

CFmail

  • August 18, 2008
  • 3 replies
  • 824 views
I am using cfmail to send emails to my users with an attached image. When they open the email i would like to show the image in the body of the email but not as a link where they have to choose to view the image. I would really appreicate any help.

Thank you,
This topic has been closed for replies.

3 replies

Inspiring
August 19, 2008
Anything except basic images have to be attached, not embedded.

Inspiring
August 19, 2008
You need a complete http path to the image no matter what folder it's in, just like Ken had in his example.
Inspiring
August 18, 2008
Use <cfmailpart>

http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_m-o_03.html#2732354

<cfmail from = "peter@domain.com" To = "paul@domain.com"
Subject = "Which version do you see?">
<cfmailpart type="html">
<h3>HTML Mail Message</h3>
<p>You are reading this message as <strong>HTML</strong>.</p>
<p>Your mail reader handles HTML text.</p>
<img src=" http://www.yoursite.com/images/image.jpg" width="522"
height="356" alt="my alt text" />
</cfmailpart>
</cfmail>


--
Ken Ford
Adobe Community Expert Dreamweaver/ColdFusion
Fordwebs, LLC
http://www.fordwebs.com


"user341975" <webforumsuser@macromedia.com> wrote in message
news:g8c4ui$7da$1@forums.macromedia.com...
>I am using cfmail to send emails to my users with an attached image. When
>they
> open the email i would like to show the image in the body of the email but
> not
> as a link where they have to choose to view the image. I would really
> appreicate any help.
>
> Thank you,
>

Participating Frequently
August 19, 2008
I could not get the image show. I kept the .cfm and the image in the same folder. Here is my code. Please correct me where i am going wrong.

<cfmail from = "fromaddress" To = "taddress"
Subject = "Test Email Attachment 2">
<cfmailpart type="html">
<h3>HTML Mail Message</h3>
<p>You are reading this message as <strong>HTML</strong>.</p>
<p>Your mail reader handles HTML text.</p>
<img src="test.JPG" alt="my alt text" width="100" height="100" border="0">
</cfmailpart>
</cfmail>