|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
CFMAIL drives me NUTS!
What kind of behavior or error messages are you seeing?Hayes, David 03/30/01 10:46 A Are all or only some of the messages not going out? If you're not getting CFJim McAtee 03/30/01 10:58 A This may be a really stupid thing to say, but did you try adding theEdward Chanter 03/30/01 11:02 A I agree with the port specification recommendation. I have seen this asJames Milks 03/30/01 11:08 A Anyone know of a custom tag available or a means within CF to convertJay Wigginton 03/30/01 11:28 A This may not be what you are looking for, but I wrote a little check writerBryan LaPlante 03/30/01 12:00 P Cool... I did find a CFX tag on the Alliare web site to do this...Jay Wigginton 03/30/01 01:06 P > Anyone know of a custom tag available or a means within CF to convertPaul Hastings 03/30/01 12:06 P > > Anyone know of a custom tag available or a means within CF to convertPhilip Arnold - ASP 03/30/01 01:02 P Then what is 10^9 in British?Jason Lotz 03/30/01 01:18 P Thanks Paul... I found this on the Alliare web site also and had a littleJay Wigginton 03/30/01 01:04 P Philip, 03/30/01 01:32 P > If you include the and it implies a decimal.Philip Arnold - ASP 04/01/01 02:00 P That's US, the "and" is sternly tought to be dropped in CA schools and I'dRaymond B. 04/01/01 04:21 P British 10^9 is one thousand million! 03/30/01 01:48 P Actually, even in the U.S. the proper way to write the amount in text would be "One Hundred One Dollars and Fifty Cents". Anyone who says otherwise, needs to go back to school.Ray Meade 08/07/06 02:17 P > > Nice tag apart from it's gramatical problems...Everett, Al \(NIH/NIGMS\) [C] 08/07/06 03:08 P surely it should be the American incorrect way to write...Robertson-Ravo, Neil (RX) 08/07/06 04:07 P What kind of behavior or error messages are you seeing? I have endless trouble with CFMail in a hosted environment - because I can't get access to the undelivered mail and if the templates don't work all I get is - well nothing. Can anyone tell me what's wrong with this code? It's from a "tell a friend about this site" form, which is supposed to pass 4 variables to the action page (names and emails for each of sender and receiver). Part of the action page is two emails - one to the site visitor and one to their friend. I don't think the problem is the tag itself, because the syntax of the <CFMAIL is the same as a working template which DOES send its email. I don't think it's the time line, because that works fine elsewhere on the site too. [first email] <cfmail to="#form.senderemail#" from="webmaster@bluegrass.org.au" subject="Told your friend about this site" server="xxx.xxx.xxx.xxx"> Apparently while visiting Bluegrass Australia (http://bluegrass.org.au) you used our form to invite a friend to visit us also. Your friend's name and address is: #form.receivername# at #form.receiveremail# We very much appreciate your support. --------------------------------------- This confirmation message was sent from: http://bluegrass.org.au. Thank you. Local Time: #dateformat(austime, "d / mmmm / yyyy")# at #timeformat(austime, "h:mm tt")# </cfmail> [end first email] [second email] <!--- Send email to the friend ---> <cfmail to="#form.receiveremail#" from="webmaster@bluegrass.org.au" subject="Check out this site I found" server="xxx.xxx.xxx.xxx"> G'day #form.receivername# ... a message from #form.sendername# -------------------------------------------------------------------- Right now I am visiting the site Bluegrass Australia - about bluegrass and acoustic music around Australia. It has some great stuff that will probably interest you too. What's on around Australia, details of new releases and where you can get them, news about the bluegrass world. So I suggest you use the URL below and have a look for yourself. Email me at #form.senderemail# and let me know what you think. The site URL is: http://bluegrass.org.au This e-mail was sent by #form.sendername# IP address: #Remote_addr# Thank you. Local Time: #dateformat(austime, "d / mmmm / yyyy")# at #timeformat(austime, "h:mm tt")# </cfmail> [end second email] Could it be the fact that there are two emails on the one template? Is that allowed? Cheers, Mike Kear Windsor, NSW, Australia AFP WebWorks Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Are all or only some of the messages not going out? If you're not getting CF errors on the page, then the problem is probably between CF and the mail server. If you're going to use from: and to: addresses as entered into a form, make sure you validate the format of the addresses. For example, if someone enters "Joe Smith" in the from:, many mail servers will reject the message. The to: address is obviously even more important. There, you could have the mail server reject the relay from CF or else the mail server may accept it and be unable to deliver it for a variety of reasons. You can't validate every possible problem, such as someone misspelling "aol.com", but you _can_ make sure the address at least looks like a valid one. Jim ----- Excess quoted text cut - see Original Post for more ----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm This may be a really stupid thing to say, but did you try adding the port="25" parameter to the <cfmail> tag......? Just to see what happens..... Omitting it has always caused me problems in the past........... Also, are you getting a CF error when it runs or does it seem to run fine and then just not send any mails...? If that's the case you may want to check to see if they're queued on your mail server..... Just a few suggestions.... -= Ed ----- Excess quoted text cut - see Original Post for more ----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm I agree with the port specification recommendation. I have seen this as well... This may be a really stupid thing to say, but did you try adding the port="25" parameter to the <cfmail> tag......? Just to see what happens..... Omitting it has always caused me problems in the past........... Also, are you getting a CF error when it runs or does it seem to run fine and then just not send any mails...? If that's the case you may want to check to see if they're queued on your mail server..... Just a few suggestions.... -= Ed ----- Excess quoted text cut - see Original Post for more ----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Anyone know of a custom tag available or a means within CF to convert numbers to text... 2 to two, 100 to one hundred, etc.? thanks Jay ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm This may not be what you are looking for, but I wrote a little check writer script for a bank once that translated the number column into dollars and cents as words on the client machine. This script was written pre IE4 before you could declair an array object by reference. All that the first function does is declaire the array object for moneyobj, the rest of the script does the work when you pass it a float or decimal number. -- script -- function moneyObj() { for (i = 0; i<moneyObj.arguments.length; i++) this[i] = moneyObj.arguments[i]; } teen = new moneyObj("Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen"," Seventeen","Eighteen","Ninteen"); ten = new moneyObj("","","Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty" ,"Ninty"); one = new moneyObj("","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"); function checkWrite(s) { var moneyString = '0123456789'; var money = ''; var printMoney = ''; for (i = 0; i <= s.length; i++) { g = s.charAt(i); if (moneyString.indexOf(g) != -1)money += g; } var dollars = money.substring(0,(money.length) -2); var cents = money.substring(dollars.length,money.length); while (cents.length < 2) { cents = 0 + cents; } while (dollars.length < 6) { dollars = 0 + dollars; } var ones = dollars.charAt(0); var tens = dollars.charAt(1); var hundreds = dollars.charAt(2); var thousands = dollars.charAt(3); var Tthousands = dollars.charAt(4); var Hthousands = dollars.charAt(5); if (ones != 0) { printMoney = one[ones] + ' hundred '; } else { printMoney = ''; } if ((tens + hundreds) < 1) { printMoney += ''; } if ((tens + hundreds) < 1 && ((hundreds + thousands) < 1 && ((thousands + Tthousands) < 1))) { printMoney += ' thousand '; } if ((tens + hundreds) > 0 && ((tens + hundreds) <= 9)) { printMoney += one[hundreds] + ' thousand '; } if ((tens + hundreds) > 9 && ((tens + hundreds) <= 19)) { printMoney += teen[hundreds] + ' thousand '; } if ((tens + hundreds) > 19 && ((tens + hundreds) < 100)) { printMoney += ten[tens] + ' ' + one[hundreds] + ' thousand '; } if (thousands != 0) { printMoney += one[thousands] + ' hundred '; } else { printMoney += ''; } if ((Tthousands + Hthousands) > 0 && ((Tthousands + Hthousands) <= 9)) { printMoney += one[Hthousands]; } if ((Tthousands + Hthousands) > 9 && ((Tthousands + Hthousands) <= 19)) { printMoney += teen[Hthousands]; } if ((Tthousands + Hthousands) > 19 && ((Tthousands + Hthousands) < 100)) { printMoney += ten[Tthousands] + ' ' + one[Hthousands]; } var UppCase = printMoney.charAt(0); var LowCase = printMoney.substring(1,printMoney.length); document.forms[0].dollarString.value = '' + printMoney + ' and ' + cents + '\/ 100'; document.write(UppCase + LowCase.toLowerCase() + ' and ' + cents + '\/ 100'); } -- End Script -- ----- Excess quoted text cut - see Original Post for more ----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Cool... I did find a CFX tag on the Alliare web site to do this... CFX_NUMBER2TEXT Has more functionality than I needed but it's working...:) thanks Jay This may not be what you are looking for, but I wrote a little check writer script for a bank once that translated the number column into dollars and cents as words on the client machine. This script was written pre IE4 before you could declair an array object by reference. All that the first function does is declaire the array object for moneyobj, the rest of the script does the work when you pass it a float or decimal number. -- script -- function moneyObj() { for (i = 0; i<moneyObj.arguments.length; i++) this[i] = moneyObj.arguments[i]; } teen = new moneyObj("Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen"," Seventeen","Eighteen","Ninteen"); ten = new moneyObj("","","Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty" ,"Ninty"); one = new moneyObj("","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"); function checkWrite(s) { var moneyString = '0123456789'; var money = ''; var printMoney = ''; for (i = 0; i <= s.length; i++) { g = s.charAt(i); if (moneyString.indexOf(g) != -1)money += g; } var dollars = money.substring(0,(money.length) -2); var cents = money.substring(dollars.length,money.length); while (cents.length < 2) { cents = 0 + cents; } while (dollars.length < 6) { dollars = 0 + dollars; } var ones = dollars.charAt(0); var tens = dollars.charAt(1); var hundreds = dollars.charAt(2); var thousands = dollars.charAt(3); var Tthousands = dollars.charAt(4); var Hthousands = dollars.charAt(5); if (ones != 0) { printMoney = one[ones] + ' hundred '; } else { printMoney = ''; } if ((tens + hundreds) < 1) { printMoney += ''; } if ((tens + hundreds) < 1 && ((hundreds + thousands) < 1 && ((thousands + Tthousands) < 1))) { printMoney += ' thousand '; } if ((tens + hundreds) > 0 && ((tens + hundreds) <= 9)) { printMoney += one[hundreds] + ' thousand '; } if ((tens + hundreds) > 9 && ((tens + hundreds) <= 19)) { printMoney += teen[hundreds] + ' thousand '; } if ((tens + hundreds) > 19 && ((tens + hundreds) < 100)) { printMoney += ten[tens] + ' ' + one[hundreds] + ' thousand '; } if (thousands != 0) { printMoney += one[thousands] + ' hundred '; } else { printMoney += ''; } if ((Tthousands + Hthousands) > 0 && ((Tthousands + Hthousands) <= 9)) { printMoney += one[Hthousands]; } if ((Tthousands + Hthousands) > 9 && ((Tthousands + Hthousands) <= 19)) { printMoney += teen[Hthousands]; } if ((Tthousands + Hthousands) > 19 && ((Tthousands + Hthousands) < 100)) { printMoney += ten[Tthousands] + ' ' + one[Hthousands]; } var UppCase = printMoney.charAt(0); var LowCase = printMoney.substring(1,printMoney.length); document.forms[0].dollarString.value = '' + printMoney + ' and ' + cents + '\/ 100'; document.write(UppCase + LowCase.toLowerCase() + ' and ' + cents + '\/ 100'); } -- End Script -- ----- Excess quoted text cut - see Original Post for more ----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm > Anyone know of a custom tag available or a means within CF to convert > numbers to text... 2 to two, 100 to one hundred, etc.? http://www.tei.or.th/eic/ under the free link. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm > > Anyone know of a custom tag available or a means within CF to convert > > numbers to text... 2 to two, 100 to one hundred, etc.? > > http://www.tei.or.th/eic/ under the free link. Nice tag apart from it's gramatical problems... 101 should be "one hundred and one" and not "one hundred one" Also, it treats billions in American and ignores British... so for UK sites it'd be wrong In case anyone is wondering, an American Billion is 1,000,000,000 (10^9) while a British Billion is 1,000,000,000,000 (10^12) Similarly, an American Trillion is 10^12 while a British Trillion is 10^18 The British version is seen as "Bi-million" as in "Million million" and "Tri-million" as in "Million million million" - the further you take this the bigger the different... Strange but often ignored number fact... Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Then what is 10^9 in British? ----- Excess quoted text cut - see Original Post for more ----- sites ----- Excess quoted text cut - see Original Post for more ----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Thanks Paul... I found this on the Alliare web site also and had a little trouble with it at first... but have it in place and functioning... :) thanks Jay > Anyone know of a custom tag available or a means within CF to convert > numbers to text... 2 to two, 100 to one hundred, etc.? http://www.tei.or.th/eic/ under the free link. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Philip, If you include the and it implies a decimal. 101.50 is one hundred one and fifty Thank You, Peter Peter J. MacDonald II Creative Computing, Inc. 100 Middle Street Lincoln, RI 02865 Phone: 401.727.0183 x123 Fax: 401.727.4998 Portable: 401.965.3661 E-MAIL: peter.macdonald@creatcomp.com Web Page: www.creatcomp.com > > Anyone know of a custom tag available or a means within CF to convert > > numbers to text... 2 to two, 100 to one hundred, etc.? > > http://www.tei.or.th/eic/ under the free link. Nice tag apart from it's gramatical problems... 101 should be "one hundred and one" and not "one hundred one" Also, it treats billions in American and ignores British... so for UK sites it'd be wrong In case anyone is wondering, an American Billion is 1,000,000,000 (10^9) while a British Billion is 1,000,000,000,000 (10^12) Similarly, an American Trillion is 10^12 while a British Trillion is 10^18 The British version is seen as "Bi-million" as in "Million million" and "Tri-million" as in "Million million million" - the further you take this the bigger the different... Strange but often ignored number fact... Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm > If you include the and it implies a decimal. > > 101.50 is one hundred one and fifty But if you're ignoring decimals, then the "and" is still required - therefore if you want the words for "101" it should still be "one hundred and one" Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm That's US, the "and" is sternly tought to be dropped in CA schools and I'd image so for other metric countries. > If you include the and it implies a decimal. > > 101.50 is one hundred one and fifty But if you're ignoring decimals, then the "and" is still required - therefore if you want the words for "101" it should still be "one hundred and one" Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm British 10^9 is one thousand million! Thank You, Peter Peter J. MacDonald II Creative Computing, Inc. 100 Middle Street Lincoln, RI 02865 Phone: 401.727.0183 x123 Fax: 401.727.4998 Portable: 401.965.3661 E-MAIL: peter.macdonald@creatcomp.com Web Page: www.creatcomp.com Then what is 10^9 in British? ----- Excess quoted text cut - see Original Post for more ----- sites ----- Excess quoted text cut - see Original Post for more ----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Actually, even in the U.S. the proper way to write the amount in text would be "One Hundred One Dollars and Fifty Cents". Anyone who says otherwise, needs to go back to school. ----- Excess quoted text cut - see Original Post for more ----- *> ********************************************************************* ----- Excess quoted text cut - see Original Post for more ----- *> ********************************************************************* ----- Excess quoted text cut - see Original Post for more ----- cfm > > Nice tag apart from it's gramatical problems... Irony. Has anyone already suggested the UDF at http://www.cflib.org/udf.cfm?ID=40 ? surely it should be the American incorrect way to write... :) "This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions." Visit our website at http://www.reedexpo.com Actually, even in the U.S. the proper way to write the amount in text would be "One Hundred One Dollars and Fifty Cents". Anyone who says otherwise, needs to go back to school. ----- Excess quoted text cut - see Original Post for more ----- *> ********************************************************************* ----- Excess quoted text cut - see Original Post for more ----- *> ********************************************************************* ----- Excess quoted text cut - see Original Post for more ----- cfm
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||