Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

embedding an image in cfmail

Status
Not open for further replies.

cfdeveloper

Programmer
Nov 20, 2003
144
0
0
GB
Hello everybody,

Is it possible to do this in ColdFusion 6.1? I ask this because the email that is sent via cfmail has a div tag in it with the style background-image attribute and when I try to open the email in ms outlook, I get prompted to enter the username and password. I have XP Professional SP2 running on my desktop.

Kindly take a look at my code:

Code:
<cfmail type="html" from="someone@someone.com" to="someone@someone.com" server="someserver" port="25" subject="Updated" replyto="someone@someone.com" failto="someone@someone.com"> 
<html> 
<head> 
<title>Job Updated/Completed</title> 
<style type="text/css"> 
  a.input_txt       { font-family: Arial, Verdana, sans-serif; font-size: 12px; color: ##000000; font-weight: normal; background-color:##bbbbbb; } 
  a.input_txt:hover    { font-family: Arial, Verdana, sans-serif; font-size: 12px; color: ##000000; font-weight: normal; background-color:##bbbbbb; } 
  a.input_txt:visited  { font-family: Arial, Verdana, sans-serif; font-size: 12px; color: ##000000; font-weight: normal; background-color:##bbbbbb; } 
</style> 
</head> 
<body bgcolor="##FFFFFF"> 
  <div style="width:100%; height:100%; background-color:##FFFFFF;" align="center"> 
    <div style="background-image:url('#request.webRoot#Images/#bground#'); background-repeat:no-repeat; width:743px; height:460px; background-color:##FFFFFF; position:relative;" align="left"> 
      <div style="position:relative; left:25px; top:120px; width:690px; height:245px;"> 
      <form id="emailFrm"> 
      <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"> 
        <tr class="label"> 
          <td> 
          Ref:  <input id="Ref" name="Ref" readonly="1" type="text" style="width:90px; border-style:none; background-color:##cbcecb;" value="#form.hidjnumber#"> 
          </td> 
        </tr> 
        <tr class="label"> 
          <td colspan="2" valign="bottom"> 
          Comments 
          </td> 
        </tr> 
        <tr> 
          <td colspan="2" valign="middle"> 
          <textarea id="lastComment" name="lastComment" readonly style="width:680px; height:165px;" class="input_txt">#form.Comment#</textarea> 
          </td> 
        </tr> 
      </table> 
      </form> 
      </div> 
    </div> 
  </div> 
  </body> 
</html>   
</cfmail>

Its the code with the url to the image that causes the problem
Code:
<div style="background-image:url('#request.webRoot#Images/#bground#'); background-repeat:no-repeat; width:743px; height:460px; background-color:##FFFFFF; position:relative;" align="left">

However, when I run the image on the browser, I don't get prompted to enter the username and password.


The security settings on the images folder is set to "Full Control"

I was wondering if anybody else has had this problem and how did you go about fixing it. I'll really apprecaite your help

Best regards
cfcoder
 
you won't get prompted for the username and password because you're sitting behind the firewall. anyone outside will be prompted to enter those ...
 
but I get the prompt and my internet connection is behind the firewall. The project I'm working on is a intranet.
 
it is an intranet site only accessible to users within the organisation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top