Page 1 of 1

CMSMailer SMTP stopped working

Posted: Thu Sep 01, 2022 1:59 pm
by janvl
Hi,

i have several installs where all of a sudden SMTP stopped working.

CMSMS (PHPMailer) says it cannot connect to the SMTP-server.

With plain and simple "Mail" it works.

I have tried the usual suspects, adding https:// to the smtp-server, using the IP-Address.
Checked the password and E-Mail-Address tried port 465 with SSL / 587 with TLS

So far no luck. Strange enough this happens on all installs no matter what server, ubuntu 16.04 or 20.04.
CMSMS 2.2.13 up to 2.2.16 .

Anyone an idea where i should start searching?

Regards,
Jan

Re: CMSMailer SMTP stopped working

Posted: Thu Sep 01, 2022 5:30 pm
by janvl
Could it have to do with the version of PHPMailer.
CMSMS has 5.2.22 - from 2017
The newest is 6.6.4

Regards,
Jan

Re: CMSMailer SMTP stopped working

Posted: Thu Sep 01, 2022 9:21 pm
by janvl
Hi,

in order to make sure i have all uptodate software i updated to 2.2.16

testing
smtp-Mail (port 465 SSL)
CMSMS 2.2.16 - PHP 7.4
in config.php: $config['permissive_smarty'] = 1;
gives:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting

I will test with PHP 8 on another server.

Regards,
Jan

Re: CMSMailer SMTP stopped working

Posted: Thu Sep 01, 2022 10:34 pm
by janvl
Hi

i solved it by using another server as a relay.

I do hope that all will work with the different servers when i have made SPF / DKIM / DMARC records.

Regards,
Jan

Re: CMSMailer SMTP stopped working

Posted: Fri Sep 02, 2022 1:07 am
by pwg
Hi janvi, would you mind sharing how you fixed the issue, as I'm also having problems with a few sites?

Many thanks for any help.

Cheers,

Paul

Re: CMSMailer SMTP stopped working

Posted: Fri Sep 02, 2022 7:21 am
by janvl
Hi,

the smtp-server that you must enter in the cmsmailer must be the identical name that is in rDNS of the linuxserver
where your website is located . . . . it seems.

As i run several servers that i manage myself i checked out where cmsmailer was working with smtp.
Since it is no problem for PHPMailer to use a different server as a relay-server i picked one where it did work.

Today i will test if this will work too with the same server where it used to work.

I hope it helps, otherwise keep in contact it can be solved.

Regards,
Jan

Re: CMSMailer SMTP stopped working

Posted: Fri Sep 02, 2022 11:37 am
by janvl
Hi,

if you take the servername that is listed as rDNS or in "etc/hosts" then it works as expected.

No http or https.

So it must be like "server.mydomain.tld" NOT "https://server.mydomain.tld".
Depending on how the server was named when it was configured.

Otherwise contact your hoster, he can give the right hostname.

For SMTP i use port 465 with SSL, make sure that in your controlpanel there is a certificate for "server.mydomain.tld".

Regards,
Jan

Re: CMSMailer SMTP stopped working

Posted: Tue Sep 06, 2022 6:48 am
by pwg
Hey Jan, thanks so much for the reply and for taking the time to put it together. Really appreciate the effort.
Cheers,
Paul