• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFmail

New Here ,
Aug 18, 2008 Aug 18, 2008

Copy link to clipboard

Copied

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,
TOPICS
Advanced techniques

Views

676

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 18, 2008 Aug 18, 2008

Copy link to clipboard

Copied

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,
>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

You need an absolute path to your image, remember the email will be on your
users computer.

<img src=" http://www.yoursite.com/images/test.JPG" alt="my alt text"
width="100" height="100" border="0">

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


"user341975" <webforumsuser@macromedia.com> wrote in message
news:g8eqat$kgs$1@forums.macromedia.com...
>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 HTML.</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>
>
>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

Thank you. I have used absolute path to image. It works fine. I also have to display a .pdf. again it should be as an attachment. When the user opens the email, the should see the pdf without selecting the link. Please help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

Pretty sure you can't display a PDF file in the email, you need to make it
an attachment.

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


"user341975" <webforumsuser@macromedia.com> wrote in message
news:g8f0ec$s5a$1@forums.macromedia.com...
> Thank you. I have used absolute path to image. It works fine. I also have
> to
> display a .pdf. again it should be as an attachment. When the user opens
> the
> email, the should see the pdf without selecting the link. Please help.
>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

You need a complete http path to the image no matter what folder it's in, just like Ken had in his example.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 19, 2008 Aug 19, 2008

Copy link to clipboard

Copied

LATEST
Anything except basic images have to be attached, not embedded.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation