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 : [EMAIL PROTECTED]
> Tel : 91-4546512/4522124
> *******************************************
> 
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
> 
> 

-- 
Jan Rademaker <[EMAIL PROTECTED]>
http://www.ottobak.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to