can you provide more detail on how it's choking and what the output of the #mailLIST.sendTO# variable is?
On 10/9/07, Les Mizzell <[EMAIL PROTECTED]> wrote: > > I've got a newsletter and email list management admin system set up for > a client. There's a number of ways they can get email addresses into a > specific list - enter through a form, import from Excel ... > > I've got validation (regEX) on the input side to try and filter out bad > addresses. > > <cfscript> > //IsEmail(address) > //Returns if a str is a valid email > function IsEmail(address) { > > if(REFindNoCase("[[:alnum:]_\.\-]+@([[:alnum:]_\.\-]+\.)+[[:alpha:]]{2,4}",address)) > return TRUE; > else return FALSE; > } > </cfscript> > > Just to be sure, I run it again on the output "Send a Newsletter" side: > > 1. <cfloop query="mailLIST"> > 2. <cfif isEmail(mailLIST.sendTO)> > 3. <cfmail from="#mailLIST.sendTO#" ...... > > 15. <cfelse> > 16. #mailLIST.sendTO# is a bad address - delete? > 17. </cfif> > > But, there seems to be an address or two that isEmail will allow, but > causes cfmail will throw an error. > > I need to be dead sure that whatever routine I'm using will catch > *anything* that cfmail is going to choke on. > > There's some pretty tough to validate real email address in the database > that look like: > [EMAIL PROTECTED] > > Ideas? > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290651 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4