Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
bug #728 convert encryption protocol value to lower case (serieznyi)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 5.x branch (closes #728).

Discussion
----------

convert encryption protocol value to lower case

I spent the whole day could not understand why I am unable to send mail and I get the next error
`Connection could not be established with host smtp.yandex.ru [Unable to find the socket transport "SSL" - did you forget to enable it when you configured PHP? #1]`
I soon realized that the Protocol specify the encryption systems in the upper register. I was very pleasantly surprised that no one has foreseen such a possibility. So I decided to fix it

Commits
-------

483f1fc convert encryption protocol value to lower case
  • Loading branch information
fabpot committed Apr 30, 2016
2 parents 121d7cf + 483f1fc commit 92e55b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/classes/Swift/Transport/EsmtpTransport.php
Expand Up @@ -140,6 +140,10 @@ public function getTimeout()
*/
public function setEncryption($encryption)
{
if (is_string($encryption)) {
$encryption = strtolower($encryption);
}

if ('tls' == $encryption) {
$this->_params['protocol'] = 'tcp';
$this->_params['tls'] = true;
Expand Down

0 comments on commit 92e55b2

Please sign in to comment.