Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
TonyP #1
CFMAIL Problem
Hi, im having a problem with cfmail. I have a field in my database that will
contain my email message. So i would like to call that message from cfmail and
have it formated in html and use the coldfusion tags. like this: <cfmail
to='#form.payer_email#' cc='#getsettings.email_cc_copy#'
from='#getsettings.email_from_name#'
subject='#getsettings.payment_email_subject#'
server='#getsettings.mail_server#' username='#getsettings.mail_username#'
password='#getsettings.mail_password#' type='html'>
#getsettings.email_message# </cfmail> here is whats in the database field:
(the email message) Dear #form.first_name# #form.last_name#,<br><br> Thank you
for purchasing #getpart.product_name#!<br> <br> Below is some information on
how to pick up your purchase....<br> <br> Please visit <a
href='#getsettings.website_path#'>#getsettings.web site_path#</a> and enter the
following:<br> <br> Username: #form.payer_email#<br> Password: #password#<br>
<br> Once logged in click the 'Download' link next to your purchase to
download. <br><br> We hope you enjoy #getpart.product_name#! If you have any
questions or problems using your product you can<br> email us at
#getsettings.support_email# or visit our support forums online at
#getsettings.your_domain#.<br><br> Sincerely,<br> Tony Paolillo<br>
#getsettings.support_email#<br> #getsettings.your_domain#<br><br><br> The
problem is that when it sends the email it sends the message as plain text and
the ## tags are not formated. Actually it looks just like i pasted it above,
with no formating. How can i call a field from the db and have it HTML
formated and use the coldfusion tags? p.s. i even tried this: <cfset
emailmessage = '#getsettings.email_message#'> and just called #emailmessage#,
had no luck. Thanks Tony
TonyP Guest
-
CFMAIL problem - every nth message disappears
ISP is running CF 4, 5, 1, SP2 Discovered a problem recently whereby every 12th message sent from a list never arrives, have been using the same... -
Problem evaluating text from within a cfmail tag usingthe query parameter
Hi I'm trying to decrypt a string using text returned from a query and wondered if anyone knows what I need to do... I've tried adding <pre>... -
Problem with # and CFMAIL
Hi, I'm trying to send an html email which has #s in it and it interferes with CFMAIL tags and doesn't work. How can I work aroung this? ... -
CFMAIL error problem with invalid email
Hi, I am having a problem on CF 7. I query through my database to send a mail shot. The problem is if a email address is not correctly formatted... -
cfmail - Attribute validation error for tag CFMAIL.
I'm getting the error ' Attribute validation error for tag CFMAIL.' on the code below. All its doing is outputting a text string to the TO: field. ... -
jdeline #2
Re: CFMAIL Problem
Does this happen with all e-mail recipients? If a recipient's e-mail server is not set up to process HTML, you'll get the results you showed.
jdeline Guest
-
TonyP #3
Re: CFMAIL Problem
Yes, it happens to all email. Then if i replace the #getsettings.email_message# with the actual message it works fine. I just cant get it to format it if i pull it from the db.
Tony
TonyP Guest
-
Kronin555 #4
Re: CFMAIL Problem
What you're looking for is the Evaluate() function.
<cfset foo = "Foo String">
<cfset bar = "Foo string is : #foo#">
<cfoutput>#evaluate("bar")#</cfoutput>
Note the quotes around bar. To do what you want, replace:
#getsettings.email_message#
in your cfmail body to:
#evaluate("getsettings.email_message")#
Kronin555 Guest
-
TonyP #5
Re: CFMAIL Problem
Thanks Kronin, that seemed to format the HTML now. But i still cant get the CF
tags to format. Here is what i have now: <cfmail to='#form.payer_email#'
cc='#getsettings.email_cc_copy#' from='#getsettings.email_from_name#'
subject='#getsettings.payment_email_subject#'
server='#getsettings.mail_server#' username='#getsettings.mail_username#'
password='#getsettings.mail_password#' type='html'>
#evaluate('getsettings.payment_email')# </cfmail> and the email comes in like
this: Dear #form.first_name# #form.last_name#, Thank you for purchasing
#getpart.product_name#! Below is some information on how to pick up your
purchase.... Please visit #getsettings.website_path# and enter the following:
Username: #form.payer_email# Password: #password# Once logged in click the
'Download' link next to your purchase to download. We hope you enjoy
#getpart.product_name#! If you have any questions or problems using your
product you can email us at #getsettings.support_email# or visit our support
forums online at #getsettings.your_domain#. Sincerely, Tony Paolillo
#getsettings.support_email# #getsettings.your_domain# Notice the HTML is gone
now, but the CF tags are still unformated. I even put <cfoutput> tags before
and after the message to see if that would format it. Tony
TonyP Guest
-
-
zoeski80 #7
Re: CFMAIL Problem
How about #evaluate(DE(getsettings.payment_email))#
- Zoe
zoeski80 Guest
-
TonyP #8
Re: CFMAIL Problem
That worked! Thank you very much. Now i will learn what the DE is.
Thanks Again
Tony
TonyP Guest
-
Buda123 #9
CFMAIL problem
Hi everibody,
I am having problem with cfmail
I have form where user is uploading file on the server, once file is uploaded
I am sending mail to administrator and file is attached. I have problem with
files with spaces in the name IE.?my long file.DOC? File is uploaded on the
server but mail is not sent, In mail.log file I have error 400. Does anyone
have solution to this, I can rename file once is uploaded and change spaces
with ?_? or something, but I would like to know if there is workaround on this.
I am attaching file with cmailparam.
Thanks
Buda123 Guest
-
jdeline #10
Re: CFMAIL problem
Consider using the URLEncodedFormat() function on your filename.
<CFSET name = URLEncodedFormat("my long file.DOC")>
jdeline Guest



Reply With Quote

