when using phpBB 3.1.10 and php 5.6.27 trying to send mail through a TLS level secured SMTP remote server will fail with a error message or it will just not work
not very well documented in phpBB is the ability to send mail through secure SMTP servers, apparently the SMTP Server Address field in the Administration Control Panel can take arguments in the following form:
sub.domain.tld ssl://sub.domain.tld tls://sub.domain.tld
for STARTTLS, SSL and TLS connection modes respectively, the recommended here is the first option, just enter the FQHN of the SMTP server, nothing more. also important, note to enter a FQHN here as do it otherwise most likely will cause the server certificate to be rejected due to coming from a different source.
however recent versions of php changed the variable value of STREAM_CRYPTO_METHOD_TLS_CLIENT to remove support for TLS level encryption connections (leaving only backwards compatible TLS connections). a quick fix for this is simply edit the functions_messenger.php file in your phpBB installation (it's under the includes folder) and then locate the stream_socket_enable_crypto function call at line 1460 and replace its second argument by one of the following:
STREAM_CRYPTO_METHOD_TLS_CLIENT STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
where the first one is what comes by default and the other two values are for TLS v1.1 and TLS v1.2 respectively. the recommended value here is STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT.
additionally this parameter can take in the form of a bitmask so we could even define a custom variable with our custom values or just set stuff like:
STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
to support either TLS v1.1 or TLS 1.2.
UPDATE: this bug is not present when using php 7.0.14 in Fedora 25 x86_64