?
avatar DJAWatt
DJAWatt
8 Jan 2018

Hi,

We are not able to receive emails from our Joomla website anymore. Our website (and Joomla) are hosted on a Microsoft Azure VM.

We have configured SMTP details to one of our google gmail accounts (with "less secure apps" active). The problem only happens with our google account.

We contacted google who say that you need to update the CA certificate.

Please help

Steps to reproduce the issue

  1. Got to Joomal Global Configuration option
  2. Try to send a test email using SMTP settings below:
    Host: smtp.gmail.com
    Port: 587
    Security: STARTTLS

Expected result

I expected to receive the test email

Actual result

Error - Unable to contact SMTP host

System information (as much as possible)

please see attached config files for System and PHP that I downloaded as JSON files from Joomla

Additional comments

I set debug to log 'everything'
I googled the problem in Joomla forum and changed the mail.php setting to temporarily stop checking certificates - see below
Editing file: libraries\joomla\mail\mail.php
Function: useSmtp
Line number approx.: #630
Change the lines:
if ($secure == 'ssl' || $secure == 'tls')
{
$this->SMTPSecure = $secure;
}

To:
if ($secure == 'ssl' || $secure == 'tls')
{
$this->SMTPSecure = $secure;
$this->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
}
3. The above change worked but I need a proper solution.

Attached zip files show logs before and after the above change.

Thanks

avatar DJAWatt DJAWatt - open - 8 Jan 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Jan 2018
avatar ReLater
ReLater - comment - 8 Jan 2018

libraries\joomla\mail\mail.php

This file doesn't exist in current Joomla 3.8.3. So, I think you're using an outdated version or reason for your issue is a non-core extension.

You should ask in a forum: https://forum.joomla.org/

avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-01-08 15:14:13
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 8 Jan 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Jan 2018
Closed_By joomla-cms-bot franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 8 Jan 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Jan 2018

Please ask help on the forums as @ReLater comment above.

This repository concerns in first Place Joomla coding. For this Reason closing this Issue, thanks.

avatar DJAWatt
DJAWatt - comment - 8 Jan 2018

Why close it without a chance to reply!

avatar DJAWatt
DJAWatt - comment - 8 Jan 2018

I've already been to the forums and followed a recommended temporary change of switching off CA authoring (see script change in my incident, which works) but I need a permanent fix.

avatar brianteeman
brianteeman - comment - 8 Jan 2018

As already stated
file: libraries\joomla\mail\mail.php
does NOT exist in the current release of Joomla v 3.8.3
so clearly you are not on the current release and must upgrade

avatar DJAWatt
DJAWatt - comment - 8 Jan 2018

The version is Joomla! 3.8.3 Stable [ Amani ] 12-December-2017 15:00 GMT.

The fix to mail.php in folder (home\site\wwwroot\libraries\src\mail) worked.

Our website provider upgraded the Joomla version to 3.8.3 (configuration is in attached files). Are you suggesting they did something wrong and that the upgrade should be redone?

avatar mbabker
mbabker - comment - 8 Jan 2018

Our website provider upgraded the Joomla version to 3.8.3 (configuration is in attached files). Are you suggesting they did something wrong and that the upgrade should be redone?

There is no suggesting, the manner in which the site was upgraded to 3.8 was wrong. Since 3.8, these files should not exist on your site.

avatar DJAWatt
DJAWatt - comment - 8 Jan 2018

But it's not clear how this relates to the SMTP problem. If non google smtp settings are used then it works. According to google, the problem is an old CA certificate.

Also, PHP Mail does not work as the Mailer option.

I can get the website provider to redo the upgrade specifically asking for them to check that all mail.php files are removed. I would have assumed they used the Joomla standard upgrade routines, which presumably should have removed unnecessary files so it's likely they will run the same upgrade process.

(please bear in mind that I'm not a Joomla expert but caught in the middle of Website vendor, Joomla and Google support).

avatar brianteeman
brianteeman - comment - 8 Jan 2018

We see it all the time. People who should know what they are doing but dont. In this case the person who did the update for you. We know they didnt do it the correct way because that file is still present. Any behaviour of the site in its current state or any changed that are made to core files in the current state are meaningless. You are not the joomla expert - the people who have replied to you are. Thats why we knew it was not a bug and that the forum was the correct place for this. Hopefully now your host will perform the upgrade correctly and then everything will work correctly

avatar DJAWatt
DJAWatt - comment - 8 Jan 2018

ok - thanks Brian. I'll get in touch with them.

Would a bad upgrade also be the reason why PHP Mail (as a Mailer option under Global Configuration\Server) does not work either?

avatar mbabker
mbabker - comment - 8 Jan 2018

Potentially. With your site being in an unknown/inconsistent state though the best course of action is going to be to get things right then start debugging issues like these again.

Add a Comment

Login with GitHub to post a comment