Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mathieu
potage
Commits
d5c16d59
Commit
d5c16d59
authored
Sep 01, 2018
by
Mat
Browse files
swiftmailer config variables for diverses connexion SMTP
parent
9a94e022
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
d5c16d59
...
...
@@ -28,6 +28,7 @@ composer.phar
## PERSO
chmod-cache.sh
mailtest.sh
.git_webhook/
.idea/
nbproject/
app/config/config.yml
View file @
d5c16d59
...
...
@@ -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
...
...
src/PotageBundle/Command/SendMailCommand.php
View file @
d5c16d59
...
...
@@ -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
"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment