-
-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to use "symfony/mailer" within Mailer
#1263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one! Dont we have to change the DI to inject the symfony mailer?
} | ||
|
||
$this->mailer->send( | ||
(new Email()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using templateEmail to have direct support for twig using the template name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will not possible in a transparent way, since the Twig template is currently providing the subject and the body:
$renderedLines = preg_split('/\R/', trim($rendered), 2, PREG_SPLIT_NO_EMPTY);
$subject = array_shift($renderedLines);
$body = implode('', $renderedLines);
I think there is no need to change the DI, since the service SonataUserBundle/src/Resources/config/mailer.xml Lines 4 to 10 in 7ec48dc
|
0dac983
to
f2c236c
Compare
Since in my projects I'm using
|
Friendly ping @jordisala1991. |
Ok @phansys, I requested a new release for SonataUserBundle via Slack in If you want to get notified about new releases, make sure to follow SonataNews on Twitter! |
Subject
Allow to use "symfony/mailer" within
Mailer
.I am targeting this branch, because this change respects BC.
Closes #1193.
Changelog
To do