Update Swiftmailer to avoid potential security risk

This commit is contained in:
Frederic Guillot
2017-01-05 20:45:33 -05:00
parent f2a24fb3bf
commit febb9ade5b
4 changed files with 66 additions and 54 deletions

View File

@@ -33,8 +33,8 @@ class Mail extends Base implements ClientInterface
$message = Swift_Message::newInstance()
->setSubject($subject)
->setFrom(array($this->helper->mail->getMailSenderAddress() => $author))
->setBody($html, 'text/html')
->setTo(array($email => $name));
->setTo(array($email => $name))
->setBody($html, 'text/html');
Swift_Mailer::newInstance($this->getTransport())->send($message);
} catch (Swift_TransportException $e) {

View File

@@ -24,6 +24,7 @@ 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(