How to disable error messages in PHPMailer?
问题 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." Thanks 回答1: 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"; 回答2: I know this thread is old and already answered but I stumbled here because I had the same