if {[catch{ns_sendmail "$email""$from""$subject""$sub_message"} errmsg]}{
ad_return_error "Mail Failed""The system was unable to send email. Please notify the user personally. This problem is probably caused by a misconfiguration of your email system. Here is the error: