Re: Error Handling!

From: Date: Tue, 12 Mar 2002 14:57:18 +0000
Subject: Re: Error Handling!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-88208@lists.php.net to get a copy of this message
On Tue, 12 Mar 2002, Thomas Edison Jr. wrote: > I want errors reported on a page when the mail() > function for any reason fails to send emails. FOr > example, if there is a malformed email address or > anything, and the mail is not sent, how can i catch > the Error and Display it on the page? the easiest way is: <? error_reporting(0); // you're the one who want's to report errors, not php function mailerror() { print "Something went wrong."; // etc... } mail(...) || mailerror(); ?> > > Thanks, > T. Edison Jr. > > > > ===== > Rahul S. Johari (Director) > ****************************************** > Abraxas Technologies Inc. > Homepage : http://www.abraxastech.com > Email : abraxastech@yahoo.com > Tel : 91-4546512/4522124 > ******************************************* > > __________________________________________________ > Do You Yahoo!? > Try FREE Yahoo! Mail - the world's greatest free email! > http://mail.yahoo.com/ > > -- Jan Rademaker <janr@486.yi.org> http://www.ottobak.com

« previous php.general (#88208) next »