Does disabled PHP Mail() function impact SMTP?

Asked

Viewed 94 times

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.

1 answer

0

I removed this and solved: $mail->Mailer = "SMTP";

  • I just wanted to get the attention of why ->Mailer fired the mail 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 the mail, note that you can use $mail->isSMTP();. I just commented to explain, maybe it’s something to add the answer ;)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.