7 Replies Latest reply on Aug 19, 2008 1:15 PM by SafariTECH

    CFmail

    user341975
      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,
        • 1. Re: CFmail
          Level 7
          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,
          >

          • 2. Re: CFmail
            user341975 Level 1
            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>
            • 3. Re: CFmail
              Level 7
              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>
              >
              >

              • 4. Re: CFmail
                Dan Bracuk Level 5
                You need a complete http path to the image no matter what folder it's in, just like Ken had in his example.
                • 5. Re: CFmail
                  user341975 Level 1
                  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.
                  • 6. Re: CFmail
                    Level 7
                    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.
                    >

                    • 7. Re: CFmail
                      SafariTECH Level 1
                      Anything except basic images have to be attached, not embedded.