• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 935
  • Last Modified:

CFMAIL and HTML attachment in Outlook



I am trying to setup CFMAIL to send an email when a form has been submitted.  I hope to be able to email a hyperlink to users, which they can click on to view reports.

I am testing the CFMail tag as shown below, the email is sent ok, but when received the message body is blank and the email is contained in an HTML attachment.  Is there anyway for the contents of the attachment to appear in the message body? I believe type must equal HTML for a hyperlink to work.

This is an internal system and everyone uses Outlook XP so it should handle embedded HTML messages?

Thanks,

Stuart



<cfmail to="abcr@abc.com"
       from="xyz@xyz.com"
       subject="New CCR Added"
type="html">
<table border="1">
  <tr>
     <td>hi how r u</td>
  </tr>
</table>

</cfmail>
0
sr_millar
Asked:
sr_millar
  • 4
  • 2
1 Solution
 
adonis1976Commented:
have your same code.. and see if you just type any text, do you get the email in the body itself.. say for eg..

<cfmail to="abcr@abc.com"
       from="xyz@xyz.com"
       subject="New CCR Added"
type="html">

hi how are you

</cfmail>
0
 
pinaldaveCommented:
The reason is that you need specify the cfmailpart
cfmail to="abcr@abc.com"
       from="xyz@xyz.com"
       subject="New CCR Added"
type="html">
   <cfmailpart
      type="html"
   >
<table border="1">
  <tr>
     <td>hi how r u</td>
  </tr>
</table>
</cfmailpart>
</cfmail>

This will send email as html as desired.
Regards,
---Pinal
0
 
sr_millarAuthor Commented:
Hi Pinal,

I tried your code but am getting the error below.  My code now looks like this:

<cfmail to="abz@abc.com"
       from="abc@xyz.com"
       subject="New CCR Added"
type="html">
   <cfmailpart
      type="html"
   >
<table border="1">
  <tr>
     <td>hi how r u</td>
  </tr>
</table>
</cfmailpart>
</cfmail>




Error Diagnostic Information
ColdFusion cannot determine how to process the tag <CFMAILPART>. The tag name may be misspelled.

If you are using tags whose names begin with CF but are not ColdFusion tags you should contact Allaire Support.


The error occurred while processing an element with a general identifier of (CFMAILPART), occupying document position (116:4) to (118:4).

The specific sequence of files included or processed is:
C:\Inetpub\wwwroot\intranet\cvr\newukcvr.cfm      


Date/Time: 05/13/05 15:41:01
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Remote Address: 192.168.1.30
HTTP Referrer: http://intranet/cvr/step3.cfm

0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
sr_millarAuthor Commented:
i don't suppose it has anything to do with the version I am running(5)?

Stuart
0
 
pinaldaveCommented:
oh. CF 5 does not support mailpart.
in that case you might have to use some custom email software, like www.coolfusion.com 
Regards,
---Pinal
0
 
sr_millarAuthor Commented:
Pinal,

That's what I was afraid of - many thanks I will look there.

Stuart
0
 
sr_millarAuthor Commented:
adonis1976 - no with your code I still get the message, with an HTM attachment.  When I open that I see the text.

Thanks,

Stuart
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now