Updated to 3.3.7 and now it won't connect to the server

I recently updated PHPList to 3.3.7. (I think this was a mistake) For some reason, now campaigns and test emails refuse to send (all was working before the update). This is the error message I get from PHPList:

Connection: opening to mail.[servenamegoeshere].com:587, timeout=40, options=array ()
Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): unable to connect to mail.[servenamegoeshere].com:587 (Connection refused)
SMTP ERROR: Failed to connect to server: Connection refused (111)
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

In looking thru the wiki and searching the forum here, I’m finding nothing that helps me solve the issue. I’m looking thru the server connection logs and it shows the user is connecting and then going idle, after it goes idle it disconnects from the server. I’m wondering if anyone has some suggestions as to why I’m getting Error number 2 and what Connection refused (111) is? Specifically. I’ve tried a couple of different users on the server and get the same result.

Thanks for any help you can provide.

You can try enabling smtp debug to get more output from phpmailer, see the explanation in config_extended.php for how to do that.

1 Like

No changes to the sending engine were made in 3.3.7 as far as I recall, so it’s most likely to be a problem with your config.php file or a change elsewhere on your server or SMTP.

I did set the SMTP Debug - that’s how I got that warning. Unless there’s somewhere specific to go look at the debug info that I’m not aware of. Is there?

The only change is PHP List. It’s my server, so I’m keen aware of the changes.

When you send a test email the debug output will be at the top of the page.

Yup, that’s where I got the info that I lead this thread with. If you’re saying that it should provide more debugging output - then something else must be amiss.

@jodywhitesides What level of debug have you set? If it is, I think, 2 or more then you should see the dialog between phpmailer and the mail server. From the earlier error messages it is not clear whether there is a connection made to the mail server.

I have it set at 4. That’s all it showed me.

This doesn’t seem to be consistent with the debug output not showing the exchange. Usually the debug output would have the connection, sending user/password etc. Can you show a screen shot of what you are seeing.

That’s the output I get with debug set to 4. I’ve tried 5 and get the same result.

@jodywhitesides it looks like a connection isn’t being made so something must be blocking it.
Is port 587 the correct one?

Which release of phplist did you upgrade from? Possibly that includes an earlier release of the phpmailer package, which is used by phplist. If that is different then you could try getting that version of phpmailer and using that instead.

1 Like

Yes, port 587 is the correct port. Same port I had before updating PHPList (when it worked fine). Unfortunately I didn’t write down the previous version number I had. But I’m guessing it was a 3.2 version - I don’t know, maybe 3.3.1. Is there a way to find out? I know I originally installed PHPList around June 2018. My method of updating was to save my config file, then replace the previous install with the new install on the server.

Here’s what the server says about the connection:

imap-login: Login: user=<[accountname]>, method=PLAIN, rip=[IP address], lip=[IP address], mpid=5671, TLS, session=<V/IykdV/MI5Do02l>

imap([accountname]): Connection closed (IDLE running for 0.001 + waiting input for 567.152 secs, 2 B in + 10+0 B out, state=wait-input) in=352 out=1272

To check the old version number, view the email headers of a campaign message which it sent. The phpList version should be stated there.

Will that be on the PHPList history cause I don’t see the headers on that list? I don’t save emails past a month.

You probably installed phplist 3.3.3 and the phpmailer package hasn’t altered since then. It is still version 5.2.22.

Can you try connecting on a different port? Also does the smtp server use a secure connection, either tls or ssl? There was a change some time ago for phpmailer to automatically try tls. You can disable that by

define('PHPMAILER_SECURE', '');

1 Like

I have tried another port, and my server requires the use of TLS, and I haven’t changed that. I turned the PHP TLS thing off, still get same issue. Same issue on port 465, 25, 2525 & 587. With TLS off & on. I even tried turning the firewall of the server completely off. All different ways - I get the same error as already posted.

I’m guessing I should try completely deleting PHPList and reinstalling from scratch? That seems to be my next move.