Browse Source

Ajout d'un parametre 'service envoi email' pour changer depuis l'admin de mailjet à alwaysdata

develop
Fabien Normand 2 days ago
parent
commit
1b53286b7e
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      Notification/MailMailjetNotification.php

+ 9
- 3
Notification/MailMailjetNotification.php View File

@@ -124,9 +124,15 @@ class MailMailjetNotification
$transport = (new \Swift_SmtpTransport(
$this->parameterBag->get('app.mail.host'),
$this->parameterBag->get('app.mail.port'),
$this->parameterBag->get('app.mail.ssl')))
->setUsername($this->parameterBag->get('app.mail.login'))
->setPassword($this->parameterBag->get('app.mail.password'));
$this->parameterBag->get('app.mail.ssl')));

if($this->parameterBag->get('app.mail.login')!="0"){
$transport->setUsername($this->parameterBag->get('app.mail.login'));
}
if($this->parameterBag->get('app.mail.password')!="0"){
$transport->setUsername($this->parameterBag->get('app.mail.password'));
}

$mailer = new \Swift_Mailer($transport);
return $mailer->send($message);
}else{

Loading…
Cancel
Save