summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php
diff options
context:
space:
mode:
authoryehuda <yehuda@myinbox.in>2019-03-04 16:40:35 +0200
committeryehuda <yehuda@myinbox.in>2019-03-04 16:40:35 +0200
commite33f6bd6bce974ec0d9836e1589ea1facf159841 (patch)
tree5dc30b48323d8379a858326ab728c94e6455eba5 /Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php
parent18c7ae6216c4705a2942b07081469c4c0f1059fd (diff)
downloadPost-SMTP-e33f6bd6bce974ec0d9836e1589ea1facf159841.zip
* Added support for our new chrome notification extension.
* few fixes
Diffstat (limited to 'Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php')
-rw-r--r--Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php b/Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php
index be6d908..6f3c978 100644
--- a/Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php
+++ b/Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php
@@ -210,7 +210,19 @@ class Postman_Zend_Mail_Protocol_Smtp extends Postman_Zend_Mail_Protocol_Abstrac
$crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT;
- if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {
+ $curl = curl_version();
+ preg_match('/.*\/(\d*\.\d*\.\d*)[a-z]?/', $curl['ssl_version'], $ver_match );
+ $tlsv1_2_installed = ! empty( $ver_match[1] ) ? $ver_match[1] >= '1.0.1' : true;
+
+ if ( $this->_host == 'smtp.office365.com' && ! $tlsv1_2_installed ) {
+
+ $error = sprintf( 'Office365 SMTP servie require TLS v1.2 and OpenSSL version 1.0.1 or greater, your current OpenSSL version is: %s.
+You need to contact your web hosting support for help.', $ver_match[1] );
+
+ throw new Postman_Zend_Mail_Protocol_Exception( $error );
+ }
+
+ if ( defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT') ) {
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
}