Sending fails with "SMTP Error: data not accepted" - but the emails DO go through

I just ran into a problem with the sending of a campaign late last night.

This system is using PHPList v 3.3.1.
Things have worked well for 4 or 5 months; it worked fine last Friday; no changes were made to the system settings since last Friday.

Today, all of the emails are coming back as failed:

Error sending email to [emailaddress] SMTP Error: data not accepted.SMTP server error: DATA END command failed

However, the emails were successfully being sent out. It ended up requeuing these ‘failed’ addresses and resending it to them every hour. I ended up with 10 copies by this morning. (Fortunately it was only one chunk of the list that appeared to be resending, and not the entire list.)

The email processing messages that I got from the system were all:

The following events occurred while processing the message queue:

[Wed 30 Aug 2017 07:00] [CL] Started
[Wed 30 Aug 2017 07:00] [CL] Sending in batches of 48 emails
[Wed 30 Aug 2017 07:00] [CL] Processing has started,
[Wed 30 Aug 2017 07:00] [CL] One campaign to process.
[Wed 30 Aug 2017 07:00] [CL] Processing message 45
[Wed 30 Aug 2017 07:00] [CL] Looking for subscribers
[Wed 30 Aug 2017 07:00] [CL] Found them: 960 to processSending of this
message has been suspended
[Wed 30 Aug 2017 08:21] [CL] Error: Sending of this message has been
[Wed 30 Aug 2017 08:21] [CL] Script stage: 6
[Wed 30 Aug 2017 08:21] [CL] 163 failed (will retry later)

I tried a simple ‘send test’ from the Edit Campaign interface to one email and it also failed with the same error.

What kinds of controls do I have that might fix this? There was a SMTP timeout somewhere that I’ll look into again, but any specific pointers would be appreciated.


I found the SMTP_TimeOut setting - it was set to 15; I upped that to 20: it failed to send with the same SMTP Data END failed message.

I then tried 40 - and the ‘send test’ function reported this error back (about 20 times):

Database error 2006 while doing query MySQL server has gone away

I tried it a 2nd time at 40 seconds…it ran for about 50 seconds and then I got a pop-up box over the PHPList Admin window that said "Initializing PHPList in your language" (or something along those lines). That went away and the Edit Campaign page was restored, but at the top of that page was the same error message about 'Error 2006 while doing query...'.

I dropped the SMTP_Timeout value down to 30 seconds, and got the same "Error 2006..." results. Is this timeout conflicting with some other MySQL timeout setting, perhaps? (I only find two instances of the word “TIMEOUT” in the Config.php file.)

I dropped the SMTP_Timeout to 25 and I don’t get the 2006 error, but now I’m back to the "SMTP error...DATA END..." failure result.

When it fails in this manner there is no error in the System -> Log Of Events table.

This is an installation on a CPanel based server - i.e. I don’t have direct full control over things. But is there someway that I can restart the MySQL server or something like that?

Turning on the PHP Debug setting doesn’t really reveal anything new, it seems. Here’s the end of the debug results:

CLIENT -> SERVER: +CPiDa5Z/pzocs78qLa6Oj/sWwdR0PraQVxwl5EkCQQw6A0gCMiShKIqGPQG7VDcFf6AhMFgwOvx
CLIENT -> SERVER: BK9iOnadnwtFUXB7PFgiIrQ47C8I7a3DL69oboyer2i64pf3Wb2/z/o/Z4jQ19LLyeMAAAAASUVO
CLIENT -> SERVER: --b2_1c81d1a3d612f125b0bebc5d5e4d4c00–
CLIENT -> SERVER: --b1_1c81d1a3d612f125b0bebc5d5e4d4c00–
SMTP ERROR: DATA END command failed:
SMTP Error: data not accepted.
SMTP ERROR: QUIT command failed:

I’m trying to find out what they did but the hosting company did something and most of these errors have gone away. Enough so, that it apparently has returned to prior operating state.

However, I have noticed that the ‘prior state’ still included these same SMTP errors once or twice per batch. These failed emails generally don’t show up after retrying apparently (i.e. there is usually only 1 error per address/per batch, although I have seen some with 2).

So that begs the question what is causing these errors in the first place?

The hosting company hasn’t been real forthcoming, but they apparently ran a ‘script’ that ‘fixed file permissions’. They couldn’t tell me which files. As mentioned before, the errors did return to pre-situation levels - but that still includes 1-2% error rate for this same problem.

How would file permissions affect the SMTP sending of emails?