You can put whatever you want inside a CFCATCH block. Check to see whether
the email is being created or not by examining the SPOOL and UNDELIVR
directories under CFUSION. If not then see what happens without the
CFLOCATION though this shouldn't be causing CFMAIL to fail.
Steve
> -----Original Message-----
> From: Bryan LaPlante [mailto:[EMAIL PROTECTED]]
> Sent: 22 May 2001 09:44
> To: CF-Talk
> Subject: Re: cfcatch and email
>
>
> Never tried to do that inside of a cfcatch block before but could you just
> populate a variable with the email message and then outside the try block
> check to see if the message is not empty and then send an email if so?
>
> Bryan
>
> ----- Original Message -----
> From: "sebastian palmigiani" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, May 21, 2001 10:39 PM
> Subject: cfcatch and email
>
>
> >
> > I want to send an email with database error info using
> cftry/cfcatch. But
> it
> > is not working. Am I trying to do something that can't be done within a
> > cfcatch block?
> >
> > Sebastian
> >
> > -------------------------------
> >
> >
> > <cftry>
> >
> > <cfquery name='foo' datasource='foo'>
> >
> > Select * from members
> >
> > </cfquery>
> >
> > <cfcatch type="database">
> >
> > <!--- EMail WebMaster --->
> > <cfmail from="[EMAIL PROTECTED]"
> > type="HTML"
> > to="[EMAIL PROTECTED]"
> > subject="Database Error">
> >
> > Date: #DateFormat(Now(), "MM D, YYY")# #TimeFormat(Now(), "h:mm
> tt")#<br>
> > Error Type: #CFCATCH.Type#<br>
> > Message: #CFCATCH.Message#<br>
> > Template: #CGI.CF_Template_Path#<br>
> > Referer: #CGI.HTTP_Referer#<br><br>
> > Details:
> > #CFCATCH.Detail#<br><br>
> > </cfmail>
> >
> > <cflocation url="index.cfm?go=Error"> --->
> >
> > </cfcatch>
> >
> > </cftry>
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists