[SOLVED]phpList 3.0.8 : Test e-mail OK but every batch e-mails in error

Hello, it’s my first message here but I use phpList for years.
phpList 3.08 - PHP Version 5.4.45
All was working fine 6 months ago for my last campaign but recently, for a new one, all e-mails failed.
I use a SMTP server to send e-mails and it is configured in tls using port 587, this configuration is done in config.php
When I send a test e-mail to my mail address all is fine and I receive the e-mail (the connection to the SMTP server is good because I saw it in phplist debug mode).
When I try to launch the campaign even by cron or by webpage every e-mails failed.
I tried to launch my cron job by command line on a very short list of e-mails (2 e-mails), the job works but I have one error on each e-mail:
phpList - Error sending message 34 (2/201) to z…@…fr (z…@…fr) [5.0196490000] (275)
I have the same problem if I try to send e-mails by web page.
I don’t understand what could be wrong because on phplist side I changed nothing.

Thanks for any help !

@zuiko If you enable verbose in your confile file then there might be more explanation of the error.

Hi duncanc, thank you for your interest in my problem.

Infortunately I don’t believe that verbose could help very much:

phpList version 3.0.8 (c) 2000-2015 phpList Ltd, http://www.phplist.com

phpList - 0 out of 1 active processes
phpList - Maximum time for queue processing: 99999 [0.0005650000] (87)
phpList - Recently sent : 0
phpList - Started [0.0011990000] (90)
phpList - Sending in batches of 201 emails [0.0000870000] (91)
phpList - select id from php_message where status not in (‘draft’, ‘sent’, ‘prepared’, ‘suspended’) and embargo < current_timestamp order by entered limit 5 [0.0001600000] (92)
phpList - Processing has started, 1 message(s) to process. [0.0003720000] (96)
phpList - sending of this campaign will stop, if it is still going in 8 days 11 hours 17 minutes 42 seconds [0.0020820000] (113)
phpList - Processing message 34 [0.0009200000] (116)
phpList - Looking for subscribers [0.0004890000] (121)
phpList - User select query select distinct u.id from php_listuser as listuser cross join php_user as u cross join php_listmessage as listmessage left join php_usermessage as um on (um.messageid = ? and um.userid = listuser.userid) where true and listmessage.messageid = ? and listmessage.listid = listuser.listid and u.id = listuser.userid and um.userid IS NULL and u.confirmed and !u.blacklisted and !u.disabled [0.0002700000] (124)
phpList - Found them: 2 to process [0.0022680000] (128)
phpList - 201 query -> select distinct u.id from php_listuser as listuser cross join php_user as u cross join php_listmessage as listmessage left join php_usermessage as um on (um.messageid = ? and um.userid = listuser.userid) where true and listmessage.messageid = ? and listmessage.listid = listuser.listid and u.id = listuser.userid and um.userid IS NULL and u.confirmed and !u.blacklisted and !u.disabled limit 0,201 [0.0002970000] (130)
phpList - Processing batch of: 2 [0.0020710000] (133)
phpList - Checking plugin Captcha Plugin
phpList - Checking plugin Common Plugin
phpList - Checking plugin CKEditor plugin
phpList - Checking plugin Campaign Statistics
phpList - Sending 34 to yyyy.cccc@gmail.com [0.0011520000] (142)
phpList - Using cached message [0.0001550000] (143)
phpList - Sending message 34 with subject Prêts pour Noël ? Avec une suprise pour vous ! to yyyy.cccc@gmail.com [0.0002800000] (145)
phpList - Error sending message 34 (1/201) to yyyy.cccc@gmail.com (yyyy.cccc@gmail.com) [3.0517600000] (253)
phpList - It took 3.0524650000 seconds to send [0.0007930000] (255)
phpList - Failed sending to yyyy.cccc@gmail.com [0.0006960000] (258)
phpList - Checking plugin Captcha Pluginsg/hr
phpList - Checking plugin Common Plugin
phpList - Checking plugin CKEditor plugin
phpList - Checking plugin Campaign Statistics
phpList - Sending 34 to zxxx@yyyy.fr [2.0042730000] (272)
phpList - Using cached message [0.0003300000] (273)
phpList - Sending message 34 with subject Prêts pour Noël ? Avec une suprise pour vous ! to zxxx@yyyy.fr [0.0003280000] (274)
phpList - Error sending message 34 (2/201) to zxxx@yyyy.fr (zxxx@yyyy.fr) [3.0175260000] (301)
phpList - It took 3.0180760000 seconds to send [0.0002310000] (301)
phpList - Failed sending to zxxx@yyyy.fr [0.0008680000] (303)
phpList - Processed 2 out of 2 subscribers [2.0030640000] (311)
phpList - Script stage: 5 [0.0005930000] (313)
phpList - 2 failed (will retry later) [0.0002000000] (314)
phpList - 1 campaign
phpList - 0 num_users_for_message
phpList - 2 batch_count
phpList - 201 batch_total
phpList - 2 sendemail returned false total
phpList - 0 send blocked by domain throttle
phpList - 0 add attachment error
phpList - 2 sendemail returned false
phpList - 2 total_users_for_message 34
phpList - 2 processed_users_for_message 34
phpList - Flushing clicktrack stats for 34: 319 => 16 [0.0036760000] (346)
phpList - Flushing clicktrack stats for 34: 4 => 16 [0.0005000000] (348)
phpList - Flushing clicktrack stats for 34: 156 => 32 [0.0004570000] (350)
phpList - Flushing clicktrack stats for 34: 320 => 16 [0.0004490000] (352)
phpList - Flushing clicktrack stats for 34: 321 => 32 [0.0004690000] (354)
phpList - Flushing clicktrack stats for 34: 322 => 16 [0.0004470000] (356)
phpList - Flushing clicktrack stats for 34: 323 => 16 [0.0004950000] (358)
phpList - Flushing clicktrack stats for 34: 324 => 16 [0.0004750000] (360)
phpList - Flushing clicktrack stats for 34: 325 => 16 [0.0005180000] (362)
phpList - Flushing clicktrack stats for 34: 69 => 16 [0.0005070000] (364)
phpList - Flushing clicktrack stats for 34: 326 => 48 [0.0005110000] (366)
phpList - Flushing clicktrack stats for 34: 327 => 16 [0.0005240000] (368)
phpList - Flushing clicktrack stats for 34: 328 => 16 [0.0005070000] (370)
phpList - Flushing clicktrack stats for 34: 329 => 16 [0.0005040000] (372)
phpList - Flushing clicktrack stats for 34: 49 => 16 [0.0005520000] (374)
phpList - Flushing clicktrack stats for 34: 42 => 16 [0.0005100000] (376)
phpList - Flushing clicktrack stats for 34: 24 => 16 [0.0004500000] (378)
phpList - Flushing clicktrack stats for 34: 22 => 16 [0.0004540000] (380)
phpList - Flushing clicktrack stats for 34: 202 => 16 [0.0004370000] (382)
phpList - Flushing clicktrack stats for 34: 203 => 16 [0.0004370000] (384)
phpList - Flushing clicktrack stats for 34: 204 => 16 [0.0004370000] (386)
phpList - Flushing clicktrack stats for 34: 205 => 16 [0.0005010000] (388)
phpList - Flushing clicktrack stats for 34: 31 => 16 [0.0005170000] (390)
phpList - Finished this run [0.0009870000] (395)

(Only true e-mail addresses have been changed in these logs)

The question could be:

  • is there a technical difference (in phpList) between sending a test e-mail and sending by batch the same e-mail ? (on just the send action)

In phpList System / Events (my interface is in French so, I’m not sure of the exact terms) I can see:
Erreur lors de l’envoi d’un courriel à
(translation: “Error sending email to”)
zxxxx@yyyy.fr The following From address failed:
pxxxxxx@yyyyyyy.com : Called Mail() without being connected

So, I think that using batch processing even by Cron or webpage, there is a connection failing to the SMTP server. But I don’t understand why it works, using the same config.php parameters, on campaign test mode.
What is the difference between batch and test mode for this precise action (connection to SMTP server)?

Is this the email address that you are using in the From field of the campaign? It should be on the same domain as the server that you are sending from.

This address pxxxxxx@yyyyyyy.com is the connection address to SMTP corresponding lower to postmaster@myserver.com
On the from field the address is on the same domain, something like news@myserver.com.

Following this old topic: https://forums.phplist.com/viewtopic.php?f=36&t=41166&p=101716&hilit=mandrill#p101716
I updated my smtp config (in config.php):
define(“PHPMAILERHOST”,‘mail.myserver.com’);
define(“PHPMAILER”,1);
$phpmailer_smtpuser = ‘postmaster@myserver.com’;
$phpmailer_smtppassword = ‘mytruepassword’;

define(‘PHPMAILERPORT’,‘587’);
define(“PHPMAILER_SECURE”,‘tls’);

define(‘SMTP_TIMEOUT’,15);

adding these 2 lines:
define(“PHPMAILER_Mailer”,‘smtp’);
define(“PHPMAILER_SMTPAuth”,true);

Without success, all is good in testing mode all e-mails fail on batch mode

of course I have also:
define (“TEST”, 0 );

I verified also my PHP config because I red something about it and Openssl seems OK via phpinfo:

openssl

OpenSSL support enabled
OpenSSL Library Version OpenSSL 1.0.1 14 Mar 2012
OpenSSL Header Version OpenSSL 1.0.1 14 Mar 2012

I found the problem !
In fact, because the testing e-mail was not working anymore when I tried, I change 2 lines in my config.php:
$phpmailer_smtpport = ‘587’;
$phpmailer_smtpsecure = ‘tls’;
replaced by:
define(‘PHPMAILERPORT’,‘587’);
define(“PHPMAILER_SECURE”,‘tls’);
Doing this, the test e-mail was working fine.
But any batch e-mail did not work anymore.
The solution for me, to have everything working, is to keep the 4 lines in config.php
I don’t know why this has been necessary to work !

Hello,
I was facing same problem on version 3.08 , it is just resolved by php version use php version 5.3 from cpanel selector, and working fine now.

Please remember that from versions 3.2.2 phpList requires a PHP version of 5.4+

Hello Mita,
I wrote in my first post that the current PHP Version was 5.4.45 on my server.

Hi Dragonrider,
but here we talked about phpList 3.08…

Yes, I noticed, but 3.0.8 is very much out of date and has many security fixes between 3.0.8 and 3.2.4 that people are (as always) advised to update to latest versions of all software where freely available.

Hello,
Yes your present server php version is 5.4 but you will find in cpanel ( if you are using ) php version selector in Software and services , and select public_html folder and assign php version 5.3,
Thanks

This feature is not open on every server and every provider.