J4 Issue ?
avatar joeforjoomla
joeforjoomla
19 Mar 2019

Related PR #23591

Steps to reproduce the issue

Try to connect to an SMTP server without any SSL/TLS security option turned on

image

Expected result

Connection is successful as in Joomla 3.9

Actual result

Connection fails and doesn't fallback anymore to a new one without a secutiry layer
It's not possible to connect to SMTP server without any SSL/TLS because $SMTPAutoTLS in the PHPMailer class is always true and not managed in any way by the mail class or Joomla options.

Additionally, even SSL/TLS options fail to connect to the SMTP server if enabled.

System information (as much as possible)

Joomla 4.0 Alpha 8

Additional comments

This is the result to have removed the following code in the Mail class within the Send function:

try
{
// Try sending with default settings
$result = parent::send();
}
catch (\phpmailerException $e)
{
$result = false;

if ($this->SMTPAutoTLS)
{
	/**
	 * PHPMailer has an issue with servers with invalid certificates
	 *
	 * See: https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#opportunistic-tls
	 */
	$this->SMTPAutoTLS = false;

	try
	{
		// Try it again with TLS turned off
		$result = parent::send();
	}
	catch (\phpmailerException $e)
	{
		// Keep false for B/C compatibility
		$result = false;
	}
}
}
avatar joeforjoomla joeforjoomla - open - 19 Mar 2019
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Mar 2019
avatar joeforjoomla joeforjoomla - change - 19 Mar 2019
The description was changed
avatar joeforjoomla joeforjoomla - edited - 19 Mar 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Mar 2019
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Category com_mailto
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Apr 2019

Can you please provide more Details. I can't reproduce this Issue.

Mailer use always PHP-Mail, but SMTP is saved in Configuration.

avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Apr 2019
Status Discussion Information Required
avatar joeforjoomla
joeforjoomla - comment - 1 Apr 2019

I'm using an SMTP account on my localhost as usual. Let me know if you need additional informations about the SMTP configuration.

avatar joeforjoomla
joeforjoomla - comment - 1 Apr 2019

The only way to have it working as in Joomla 3 is settings
public $SMTPAutoTLS = false;
in the PHPMailer.php

avatar joeforjoomla
joeforjoomla - comment - 1 Apr 2019

image

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Apr 2019

I searched for SMTP at CloudAccess, can't find.

avatar joeforjoomla
joeforjoomla - comment - 1 Apr 2019

I don't know which SMTP you are searching. I'm just talking about a standard SMTP account.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Apr 2019

standard SMTP account

Don't know what this mean.

avatar joeforjoomla
joeforjoomla - comment - 1 Apr 2019

Don't you know what is an SMTP account?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Apr 2019

I don't know what you mean by "standard" SMTP-Account, so i searched at CloudAccess.

avatar joeforjoomla
joeforjoomla - comment - 1 Apr 2019

I mean an SMTP account configured as in the screenshot.

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar wilsonge wilsonge - change - 13 May 2019
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2019-05-13 13:19:25
Closed_By wilsonge
avatar wilsonge
wilsonge - comment - 13 May 2019

Please test #24886

avatar wilsonge wilsonge - close - 13 May 2019

Add a Comment

Login with GitHub to post a comment