Or course if you are using ColdFusion 8 you could use this approach http://www.danvega.org/blog/index.cfm/2007/5/11/Scorpio--ArgumentsCollection
Dan Vega http://www.danvega.org/blog/ On 8/1/07, Raymond Camden <[EMAIL PROTECTED]> wrote: > > Actually, the server attribute for cfmail lets you embed u/p in it. So > in my code I'll just have 2 blocks in a CFIF. One block for a totally > unprotected cfmail (where its set in the cfadmin) and one that passes > the server info, which MAY or may not have username/password in it. > > Checkout how lighthouse pro does this. > > On 8/1/07, Rick Root <[EMAIL PROTECTED]> wrote: > > CFMBB - and several of my applications - use cfmail to send mail. > > > > On some hosts, you don't need to include the SERVER, USERNAME, and > > PASSWORD attributes. > > > > On some hosts, you do. > > > > I'd like to make this a non-required configuration option, but you > > can't supply blank strings to these fields. > > > > Seems to me the only way to deal with this would be something like this: > > > > <cfif mailServer neq ""> > > <cfif mailUser neq ""> > > <cfmail ... server="#variables.mailServer#" > > username="#mailUser#" password="#mailPass#"></cfmail> > > <cfelse> > > <cfmail ... server="#variables.mailServer#"></cfmail> > > </cfif> > > <cfelse> > > <cfmail ...></cfmail> > > </cfif> > > > > Any better way to do this (besides using the attributes collection in > CF8!)? > > > > Rick > > -- > > Rick Root > > Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at > > www.opensourcecf.com > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285082 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

