From 74b2a1ffb43c704be64c7ac3215bdb2f29b12caf Mon Sep 17 00:00:00 2001 From: Thomas Lutz Date: Sun, 7 Aug 2016 17:30:17 +0200 Subject: fix selfsigned ssl certificates swift mail --- app/Core/Mail/Transport/Smtp.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/Core/Mail') diff --git a/app/Core/Mail/Transport/Smtp.php b/app/Core/Mail/Transport/Smtp.php index 66f0a3aa..ec7eb541 100644 --- a/app/Core/Mail/Transport/Smtp.php +++ b/app/Core/Mail/Transport/Smtp.php @@ -24,6 +24,9 @@ class Smtp extends Mail $transport->setUsername(MAIL_SMTP_USERNAME); $transport->setPassword(MAIL_SMTP_PASSWORD); $transport->setEncryption(MAIL_SMTP_ENCRYPTION); + if (HTTP_VERIFY_SSL_CERTIFICATE === false) { + $transport->setStreamOptions(array('ssl' => array('allow_self_signed' => true, 'verify_peer' => false, 'verify_peer_name' => false,))); + } return $transport; } -- cgit v1.2.3