ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.

ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!
Download and Activate to enter!

Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.


Tutorials
| Forums

Download to Enter
| Contest Rules

DOWNLOAD INTEL® GPA FOR FREE

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 14th, 2008, 11:08 AM
jennypretty jennypretty is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 11 jennypretty User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 47 sec
Reputation Power: 0
How to add HTML code to format in CFMAIL

Hello,
I am a newbie to CFMAIL and like to ask if there is a way to format the output within CFMAIL. I tried to enter HTML code within CFMAIL and I got the html code from output.

I created a simple comments form for users to submit their comments, and send this result to my email.

Here is my code:

<CFMAIL TO = "test@test.com"
FROM = "test@test.com"
SUBJECT = "test"
>

New suggestions: <br />
<b>Name:</b> #name#
<b>Comments:</b> #comments#
</CFMAIL>

On the output, I received all html code and when a user enter multiple rows of suggestions, they are not aligned properly in the email.

How do I format the output within cfmail?
How do I get good format for the comments with multiple rows?

Thanks very much.

Jenny.

Reply With Quote
  #2  
Old August 14th, 2008, 02:05 PM
kiteless kiteless is offline
Moderator
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 4,864 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 3 Days 16 h 17 m 54 sec
Reputation Power: 963
Just use type="html". You can check the docs for full details.

Reply With Quote
  #3  
Old August 18th, 2008, 01:45 PM
Master__Chief Master__Chief is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 338 Master__Chief User rank is Sergeant Major (2000 - 5000 Reputation Level)Master__Chief User rank is Sergeant Major (2000 - 5000 Reputation Level)Master__Chief User rank is Sergeant Major (2000 - 5000 Reputation Level)Master__Chief User rank is Sergeant Major (2000 - 5000 Reputation Level)Master__Chief User rank is Sergeant Major (2000 - 5000 Reputation Level)Master__Chief User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 5 h 53 m 48 sec
Reputation Power: 45
<CFMAIL TO = "test@test.com"
FROM = "test@test.com"
SUBJECT = "test"
type="html"
>

Reply With Quote
  #4  
Old August 21st, 2008, 12:44 PM
mateojaime mateojaime is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 3 mateojaime User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 55 m 17 sec
Reputation Power: 0
RE: adding HTML to CFMAIL

one thing to think about when sending HTML code via CFMAIL is that you will need to use inline styling rather than referencing a CSS file reason being is MS Outlook alot of times does not like CSS files especially if your email gets forwarded, hence your HTML layout can get messed up so to use inline styling with your HTML is a good standard to use that way if your HTML email gets forwarded it looks consistent.

EX:
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; font-family:Arial, Helvetica, sans-serif;">
<tr>
<td></td>
</tr>
</table>

Reply With Quote
  #5  
Old August 23rd, 2008, 08:15 PM
mackindlays mackindlays is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 11 mackindlays User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 6 sec
Reputation Power: 0
If this is for business use and not a spam bot.. be sure to override the default CF mail header...

<cfsilent>
<cfmailparam name="X-MimeOLE" value="Produced By Microsoft Exchange V6.5.7226.0">
<cfmailparam name="X-MS-Has-Attach" value="yes">
<cfmailparam name="X-MS-TNEF-Correlator" value="">
<cfmailparam name="Content-class" value="urn">
<cfmailparam name="content-classes" value="message">
<!---- if you have attachments add them in too---->
<cfif len(arguments.messagebean.getAttachment_1())>
<cfmailparam file="#attachment_local_file_1#">
</cfif>

</cfsilent>

Many mail services bounce CF generated mail's now.
good luck

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > How to add HTML code to format in CFMAIL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 10 - Follow our Sitemap