Disable PHPMailer error messages
How do I disable the error messages from the PHPMailer class? I'm displaying my own error messages and I don't want users to see errors such as "SMTP Error: Could not connect to SMTP host." My code: http://pastie.org/1497819 Thanks This is not probably the best solution, but it works. In your phpmailer library folder open "class.phpmailer.php", find public function Send() inside it comment the line echo $e->getMessage()."\n"; I know this thread is old and already answered but I stumbled here because I had the same problem but ending up solving it differently so I thought I'd share. NOTE: I'm