Project

General

Profile

Actions

Bug #24917

closed

encrypted SMTP: Requirement check missing

Added by Julian Hofmann almost 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-02-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

There is no check, if the environment supports encryption. In t3lib_mail_Mailer $useEncryption is directly taken out of $GLOBALS['TYPO3_CONF_VARS']['MAIL']. Without proper openSSL, this results in an error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Connection could not be established with host example.com [Unable to find the socket transport "tls" - did you forget to enable it when you configured PHP? #5] | Swift_TransportException thrown in file /var/www/id1234/files/typo3_src-4.5.0/typo3/contrib/swiftmailer/classes/Swift/Transport/StreamBuffer.php in line 235

For SSL or TLS encryption to work, PHP installations must have appropriate OpenSSL transports wrappers. You can check if "tls" and/or "ssl" are present in your PHP installation by using the PHP function stream_get_transports().

Old:
$useEncryption = ($mailSettings['transport_smtp_encrypt'] ? TRUE : FALSE);

New:
if (in_array('tls', stream_get_transports())) {
$useEncryption = ($mailSettings['transport_smtp_encrypt'] ? TRUE : FALSE);
}
(issue imported from #M17432)

Actions

Also available in: Atom PDF