0
I use wordpress, and am using the plugin contact form 7
.
When sending an email by clicking the button, it returns me the following error:
Fatal error: Cannot declare class phpmailerException, because the name is already in use in /home/Storage/d/94/6a/renovedigital/public_html/wp-includes/class-phpmailer.php on line 4040
Going down that line I found the following code:
4025 /**
4026 * PHPMailer exception handler
4027 * @package PHPMailer
4028 */
4029 class phpmailerException extends Exception
4030 {
4031 /**
4032 * Prettify error message output
4033 * @return string
4034 */
4035 public function errorMessage()
4036 {
4037 $errorMsg = '<strong>' . $this->getMessage() . "</strong><br />\n";
4038 return $errorMsg;
4039 }
4040 }
He is complaining that this class is already declared and cannot redeclare. You are redeclareting this class somewhere in your code?
– Henrique Marti
If you’re using
include
swap forinclude_once
.– Guilherme Nascimento
Thank you William, solved!
– carloshsa