Commit d5c16d59 authored by Mat's avatar Mat

swiftmailer config variables for diverses connexion SMTP

parent 9a94e022
......@@ -28,6 +28,7 @@ composer.phar
## PERSO
chmod-cache.sh
mailtest.sh
.git_webhook/
.idea/
nbproject/
......@@ -11,7 +11,6 @@ parameters:
locale: fr
app.path.legume_images: /uploads/images/legumes
# Fixe le nommage des variables de plusieurs mots
# Attention, ça va disfonctionner, il faut repasser dans tous les javascripts !!!!
jms_serializer.camel_case_naming_strategy.class: JMS\Serializer\Naming\IdenticalPropertyNamingStrategy
framework:
......@@ -75,8 +74,12 @@ doctrine:
swiftmailer:
transport: '%mailer_transport%'
host: '%mailer_host%'
port: '%mailer_port%'
encryption: '%mailer_encryption%'
auth_mode: '%mailer_auth_mode%'
username: '%mailer_user%'
password: '%mailer_password%'
timeout: 10
spool: { type: memory }
# FOSUserBundle Configuration
......
......@@ -71,15 +71,16 @@ class SendMailCommand extends ContainerAwareCommand
case "test":
$message = (new \Swift_Message('Hello Email'))
$message = (new \Swift_Message('[Docker][Symfony][cli] Mail de test '))
->setFrom('postmaster@potage.domainepublic.site')
->setTo('mat@collectifs.net')
->setBody(
'coucou, ceci est un test', 'text/html'
)
;
'coucou, ceci est un test',
'text/html'
);
$this->mailer->send($message);
$output->writeln('Mail sent.');
$output->writeln('[Docker][Symfony][cli] Mail sent.');
break;
......@@ -89,7 +90,7 @@ class SendMailCommand extends ContainerAwareCommand
$to = array( 'email' => 'mat@collectifs.net', 'fullName' => 'Matla', 'token' => null );
$retour = $this->newsletter->sendMail(
$to,
"[Potage][cli] envoi de la lettre à une seul destinataire",
"[Docker][Symfony][cli][infolettre][single] Mail de test",
$lettre
);
$retourMsg = ( $retour === 1 ) ? "\e[1;32mSent\e[0m\n" : "\e[1;31mError\e[0m\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment