|
|
@@ -120,14 +120,23 @@ class MailMailjetNotification |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
// Classique (SMTP) |
|
|
|
/*$transport = (new \Swift_SmtpTransport('smtp-placedulocal.alwaysdata.net', 587, 'tls')) |
|
|
|
->setUsername('contact@placedulocal.fr') |
|
|
|
->setPassword('7sgd5x2BVStJ69'); |
|
|
|
$mailer = new \Swift_Mailer($transport); |
|
|
|
return $mailer->send($message);*/ |
|
|
|
|
|
|
|
// Mailjet |
|
|
|
return $this->transport->send($message); |
|
|
|
if($this->settingSolver->getSettingValue($siteDefault, SiteSettingDefinition::SETTING_MAILER_HOST)=== SiteSettingDefinition::SETTING_MAILER_HOST_SMTP){ |
|
|
|
$transport = (new \Swift_SmtpTransport( |
|
|
|
$this->parameterBag->get('app.mail.host'), |
|
|
|
$this->parameterBag->get('app.mail.port'), |
|
|
|
$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->setPassword($this->parameterBag->get('app.mail.password')); |
|
|
|
} |
|
|
|
|
|
|
|
$mailer = new \Swift_Mailer($transport); |
|
|
|
return $mailer->send($message); |
|
|
|
}else{ |
|
|
|
return $this->transport->send($message); |
|
|
|
} |
|
|
|
} |
|
|
|
} |