sup barney... thats what ive got...

<cfquery name="GetPartnerEmailAddresses" datasource="#usersDatasource#">
     select email from regions where email like '[EMAIL PROTECTED]'
</cfquery>

<cfloop query="GetPartnerEmailAddresses">

        <cftry>

        <cfmail to="[EMAIL PROTECTED]" from="[EMAIL PROTECTED]" subject="Test,
please disregard" spoolenable="No">This is a test, please
disregard.</cfmail>

                 This worked!
        
         <cfcatch type="Any">

<cfmail to="[EMAIL PROTECTED]" from="TheWebsite" subject="Email Manager
Error" spoolenable="No">This error happened on
#DateFormat(Now(),'mm/dd/yyyy')#
Here is what happened:
Message: #cfcatch.message#
Detail: #cfcatch.detail#
</cfmail>
           
           This didnt work.

            </cfcatch>

</cftry>

</cfloop>

and what happens is... it looks like its worked, as i see 10 "This
worked" on the screen, and only one "This didnt work", but @ the
bottom of the screen in the debugging output, and exception error...
and no emails go out at all :( ?

tw

On Thu, 10 Feb 2005 16:50:14 -0800, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> Because of the loop.  There's only one CFMAIL tag, so if it errors,
> it's done executing.  If you want it to continue, you need this:
> 
> <cfloop query="myQuery">
>  <cftry>
>    <cfmail ... >
>    </cfmail>
>    <cfcatch ...>
>    </cfcatch>
>  </cftry>
> </cfloop>
> 
> cheers,
> barneyb
> 
> On Thu, 10 Feb 2005 19:39:33 -0500, Tony Weeg <[EMAIL PROTECTED]> wrote:
> > hi there.
> >
> > i have a set of code that gets a bunch of email addresses from a database,
> > it then loops through that query, and sends an email once, for every
> > email address.
> >
> > i have a cftry/cfcatch block around the cfmail tag, and if it catches
> > an exception it is set in the cfcatch section to send me an email, but
> > continue through the rest of the loop.  almost like, if it encounters
> > and email problem, it doesnt continue, or send any of the other
> > emails....
> >
> > any ideas why?
> >
> > --
> > tony
> >
> > Tony Weeg
> 
> --
> Barney Boisvert
> [EMAIL PROTECTED]
> 360.319.6145
> http://www.barneyb.com/
> 
> Got Gmail? I have 50 invites.
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:194160
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to