0
I am facing problems with Phpmailer, the class version is the 5.1, that is generating the following error: Could not instantiate mail function
error that corresponds to an instance problem.
Checking the possible causes of this, I analyzed that the Directive: disable_functions is including the function mail()
.
Therefore, when using it I have the following error:
Warning: mail() has been disabled for security reasons
Faced with all this, I wonder if the error generated, Could not instantiate mail Function, has direct relation to the lack of this function in the php.ini
.
Obs: The MX server is configured for the G Suite, logo SMTP settings are google gmail.
I just wanted to get the attention of why
->Mailer
fired themail
instead of SMTP, if you look at doc http://phpmailer.github.io/PHPMailer/classes/PHPMailer.html#property_Mailer you will notice that all values are lowercase, it is likely that the "value" is case-sensitive and because the class did not understand the value eventually assumed themail
, note that you can use$mail->isSMTP();
. I just commented to explain, maybe it’s something to add the answer ;)– Guilherme Nascimento