Work Around for disabled the mail() function
You might have seen where customers complaining that when they request for WordPress admin password reset through www.yourwebsitename.com/wp-admin link, they are getting the error message as “possible reason: your host may have disabled the mail() function“.
In such cases, you can follow the below instructions to resolve the issue.
– Log into the FileManager and access the folder: /wp-includes/pluggable.php
– Open the file pluggable.php in Code Edit format and then search for $phpmailer->setFrom( $from_email, $from_name or look for 352 line.
– Here, you have to insert the word false next to $from_name, For example: $phpmailer->setFrom( $from_email, $from_name, false );
– Then click on Save button
You can find the same instructions at: https://core.trac.wordpress.org/attachment/ticket/37736/37736.patch
Most of the time, this also works for PHP contact form issues as well. So we can try the same changes for contact form plugin errors.
If you are still getting the same PHP mailer error, please try adding the below code in the wp-config.php file:
define(‘WP_ACCESSIBLE_HOSTS’, ‘www.googleapis.com, login.live.com, api.login.yahoo.com’);
You might have seen where customers complaining that when they request for WordPress admin password reset through www.yourwebsitename.com/wp-admin link, they are getting the error message as “possible reason: your host may have disabled the mail() function“.
In such cases, you can follow the below instructions to resolve the issue.
– Log into the FileManager and access the folder: /wp-includes/pluggable.php
– Open the file pluggable.php in Code Edit format and then search for $phpmailer->setFrom( $from_email, $from_name or look for 352 line.
– Here, you have to insert the word false next to $from_name, For example: $phpmailer->setFrom( $from_email, $from_name, false );
– Then click on Save button
You can find the same instructions at: https://core.trac.wordpress.org/attachment/ticket/37736/37736.patch
Most of the time, this also works for PHP contact form issues as well. So we can try the same changes for contact form plugin errors.
If you are still getting the same PHP mailer error, please try adding the below code in the wp-config.php file:
define(‘WP_ACCESSIBLE_HOSTS’, ‘www.googleapis.com, login.live.com, api.login.yahoo.com’);