[CFCDev] Avoiding Evaluate While Using CFMAIL

2006-06-08 Thread Seth MacPherson
Hello all, I have some code that sends email to a list of recipients but Im having trouble and Id love some advice. cfset var campaign = GetCampaign() / cfmail query=recipients to=#recipients.email# from=#Campaign.GetEmailFrom()# (#Campaign.GetEmailFromAlias()#)

Re: [CFCDev] Avoiding Evaluate While Using CFMAIL

2006-06-08 Thread Blair McKenzie
You could just treat it like a template with fields that need to be replace()'ed.BlairOn 6/8/06, Seth MacPherson [EMAIL PROTECTED] wrote: Hello all, I have some code that sends email to a list of recipients but I'm having trouble and I'd love some advice. cfset var

RE: [CFCDev] Avoiding Evaluate While Using CFMAIL

2006-06-08 Thread Peter Bell
Title: Message That's what we do. If you have a discrete list of variables, loop through the list of variables, replacing them with their values. Theoretically, you could also save it to file and include using save content, although I don't think it'd be a great idea. If you do change to

Re: [CFCDev] Avoiding Evaluate While Using CFMAIL

2006-06-08 Thread Nando
Why can't you simply put the email tag in a loop and place your variables directly in the cfmail tag? I can't tell from your example where those variables are coming from, but it seems from the recipients query. Would that work for you? cfset var campaign = GetCampaign() / cfloop

Re: [CFCDev] Avoiding Evaluate While Using CFMAIL

2006-06-08 Thread Nick Tong - TalkWebSolutions.co.uk
or use the cfmail query attribute?On 08/06/06, Nando [EMAIL PROTECTED] wrote: Why can't you simply put the email tag in a loop and place your variables directly in the cfmail tag? I can't tell from your example where those variables are coming from, but it seems from the recipients

RE: [CFCDev] Avoiding Evaluate While Using CFMAIL

2006-06-08 Thread Peter Bell
Title: Message Right, but what if you have a customizable template which admins (without programming skills, but with the ability to type simple variable names) want to be able to edit? Imagine a form with a WYSIWYG editor and telling site admins to "just type #LastName#" where you want

[CFCDev] n-parameters?

2006-06-08 Thread Peter Bell
Title: Message One more question. Lets say a function call arbitrarily requires n-parameters, I'd like to do something like: Local.LoopReturns = evaluate("Request.#Local.Temp.Class#.#Local.Temp.Method#(Local.Temp.Parameters)"); where I concatenate the values of the n-parameters into a

Re: [CFCDev] Help with dumping Evaluate() . . .

2006-06-08 Thread Steve Bryant
Peter, Assuming I understand your question, I can see two approaches. 1) Give up cfscript and use cfinvoke (far more flexible for this sort of thing). 2) Create function or method that uses cfinvoke to call a generic component and method with specified arguments. For example: cffunction

Re: [CFCDev] n-parameters?

2006-06-08 Thread massimo
Any ideas on generically calling functions with n-parameters within a loop so the same line of code can call any method of any class with any number of parameters? A combination of cfinvoke and cfinvokeargument should do the work. Massimo

Re: [CFCDev] n-parameters?

2006-06-08 Thread Steve Bryant
Use argumentCollection and pass in a struct: example: result = component.method(argumentCollection=mystruct); Steve Bryant 918-449-9440 Bryant Web Consulting LLC http://www.BryantWebConsulting.com/ http://steve.coldfusionjournal.com/ At 09:13 AM 6/8/2006, Peter Bell wrote: One more question.

Re: [CFCDev] Help with dumping Evaluate() . . .

2006-06-08 Thread Jerry Ela
Title: Message If you need to pass n ordered parameters, I'm not sure if there is a solution. But if can be a structure of name value pairs this method should do what you want Local.TempReturns = dynamicMethodCall(object=Request[Local.Temp.Class], method=Local.Temp.Method,

Re: [CFCDev] Help with dumping Evaluate() . . .

2006-06-08 Thread Jerry Ela
Title: Message The args argument should default to #structNew()# instead of a null string. Jerry Ela wrote: If you need to pass n ordered parameters, I'm not sure if there is a solution. But if can be a structure of name value pairs this method should do what you want

RE: [CFCDev] Help with dumping Evaluate() . . .

2006-06-08 Thread Peter Bell
Hi Steve, Firstly, re: n-arguments, you nailed it: result = component.method(argumentCollection=mystruct); (also a thanks to Brian Rinaldi who I bugged over Gmail and who got me the same crucial answer even faster - Thanks Brian!) Secondly, I am always loathe to give up cfscript, so you're

RE: [CFCDev] Help with dumping Evaluate() . . .

2006-06-08 Thread Peter Bell
Title: Message Hi Jerry, Looks good. If I do break this out into a function, this would be the perfect code - thanks! Best Wishes,Peter -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jerry ElaSent: Thursday, June 08, 2006 10:46 AMTo:

RE: [CFCDev] Avoiding Evaluate While Using CFMAIL

2006-06-08 Thread Duba, Phillip
Title: Message We loop and use ReplaceNoCase with {} around our fields in the body of the message itself, but the fields have descriptive values like {Last Name}, not actual field names (i.e. LastName). All is controlled through Data Dictionary items attached to the emails where the table,

RE: [CFCDev] Avoiding Evaluate While Using CFMAIL

2006-06-08 Thread Seth MacPherson
Title: Message Thank you, Nando. Sounds like a good solution. Ill check it out. You going to CFUnited? - Seth From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nando Sent: Thursday, June 08, 2006 8:51 PM To: CFCDev@cfczone.org Subject: Re: [CFCDev] Avoiding