Phpmailer compatibility and Free hosting
Solved
danielos77
Posted messages
109
Registration date
Status
Member
Last intervention
-
dubreuilp -
dubreuilp -
Hello,
The mail() function does not work for sending an email to 2 addresses simultaneously (despite following the indications given at https://www.php.net/manual/fr/function.mail.php).
Note, the page is hosted by Free, the sender address is indeed xxxxx@free.fr. A test, with the usual mail software, from the sender box to the destination address indicated in the script works perfectly. The page with the mail code only works for a single destination address which is not necessarily the first one indicated in the To: (and moreover is from a single ISP).
Anyway, to try to work around this problem, I am trying to use phpmailer.
As a PHP 5.6 user, I have indeed added the lines:
$mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) );
The installed version is the latest (6.1.5) and when I run the code, it works for a while then displays Free’s page with "500 Error - Internal Server Error". And obviously no email arrives.
This error would come from the .htaccess located at the root of the site. We workaround by renaming the file to a.htaccess … It’s true that I no longer see the Free page with "500 Internal Server Error" but without the .htaccess, I revert to PHP 4.4.3-dev while phpmailer from its 6.0 version of 28/08/2017 requires PHP 5.5 or higher!
It’s a bit of a catch-22.
And so my question is: Is there a user who uses phpmailer in a script hosted at Free?
Thank you in advance
Daniel
Configuration: Windows / Firefox 75.0 / php 5.6.34
The mail() function does not work for sending an email to 2 addresses simultaneously (despite following the indications given at https://www.php.net/manual/fr/function.mail.php).
Note, the page is hosted by Free, the sender address is indeed xxxxx@free.fr. A test, with the usual mail software, from the sender box to the destination address indicated in the script works perfectly. The page with the mail code only works for a single destination address which is not necessarily the first one indicated in the To: (and moreover is from a single ISP).
Anyway, to try to work around this problem, I am trying to use phpmailer.
As a PHP 5.6 user, I have indeed added the lines:
$mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) );
The installed version is the latest (6.1.5) and when I run the code, it works for a while then displays Free’s page with "500 Error - Internal Server Error". And obviously no email arrives.
This error would come from the .htaccess located at the root of the site. We workaround by renaming the file to a.htaccess … It’s true that I no longer see the Free page with "500 Internal Server Error" but without the .htaccess, I revert to PHP 4.4.3-dev while phpmailer from its 6.0 version of 28/08/2017 requires PHP 5.5 or higher!
It’s a bit of a catch-22.
And so my question is: Is there a user who uses phpmailer in a script hosted at Free?
Thank you in advance
Daniel
Configuration: Windows / Firefox 75.0 / php 5.6.34
1 answer
-
If anyone drops by here looking for an answer. I confirm that Free does not support phpmailer. Nor does mail() in general (except for difficult-to-explain exceptions) at least not without the ability to address an email to multiple recipients. I therefore recommend looking for another hosting provider that offers these services. As offerings evolve over time, I will not name any, but a simple search on the net will allow you to find and compare. Good luck
--