A conditional is five lines of trivial code that gets copy/pasted and
most sites don't have that many cfmail tags. For new sites I prefer a
wrapper class/function/custom tag, but it is often hard to retrofit an
established site with a sitewide cfmail replacement. The easiest
solution in the short term is to add in conditionals or disable the
cfmail tag in dev.

-Mike Chabot

On Tue, Dec 30, 2008 at 6:55 PM, Wil Genovese <[email protected]> wrote:
> Yikes - that could be an ugly amount of code if there are a lot of
> cfmail tags.
>
> I'd make a mail CFC wrapper for the cfmail tag and then pass your mail
> params the the CFC.  This CFC can then control if is on the Dev server
> or not and adjust the ONE cfmail tag accordingly.
>
>
>
> Wil Genovese
>
> One man with courage makes a majority.
> -Andrew Jackson
>
> A fine is a tax for doing wrong. A tax is a fine for doing well.
>
> On Dec 30, 2008, at 5:39 PM, Mike Chabot wrote:
>
>> Put conditionals before every cfmail tag to determine the recipients
>> based on which server environment you are in. It would help to have a
>> wrapper class around cfmail that handles this site-wide. I would not
>> try to monitor the spool folder. You can disable sending email
>> entirely in cfadmin, although you would need some alternate way to
>> test emails.
>>
>> -Mike Chabot
>>
>> On Tue, Dec 30, 2008 at 1:30 PM, Chris Spencer <[email protected]>
>> wrote:
>>> On my development server, I'd like to filter all outgoing email and
>>> replace the recipients with an arbitrary email address, in order to
>>> prevent customers from being accidentally emailed.
>>>
>>> Obviously, this could be done by removing customer addresses from the
>>> database, but I'd like to keep these intact for testing various
>>> reports that require unique addresses for each customer.
>>>
>>> There doesn't seem to be any existing feature in Cfadmin for this.
>>> Any
>>> thoughts on how I'd go about implementing this? One thought I had was
>>> to create a script that would monitor CF's spool directory, and
>>> modify
>>> any newly creating files, but I'm not sure how I'd guarantee the
>>> script would see the files before CF.
>>
>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-server/message.cfm/messageid:6717
Subscription: http://www.houseoffusion.com/groups/cf-server/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.10

Reply via email to