在函数调用后继续在php中执行,而不依赖于函数执行

This sounds a bit odd but I have a situation where I have to send email using php mail function. This mail function is in a sub function. Now I want to execute my php script complete without having to worry about success or failure of the mail function. Like I don't care whether the mail function was executed successfully or not because of any error or something but I want my php script to be executed completely. How can I achieve this ?

Thanks in advance.

A long as your use of the mail function is correct, your php script should continue to run after executing the mail function whether it succeeds or not in sending the mail.

What is the error you are getting? You could always wrap it in...

try {

} catch(Exception $e) {

}