youshido / mail
Symfony Budnle for Email templates, variables and attachments integration
v0.2.6
2017-05-09 14:06 UTC
Requires
- php: >=5.6
- symfony/framework-bundle: ~3.1
- symfony/swiftmailer-bundle: ^2.4
This package is not auto-updated.
Last update: 2026-03-15 03:07:22 UTC
README
1. Basic config:
youshido_mail: config: from: test@test.com # default from for all emails emails: registration_success: # email config id subject: Welcome to our service #not necessary template: '@App/emails/register-success.html.twig' from: billing@test.com # optional From for this config personal_reminder: # email config id subject: Hi %name%, your reminder is here! template: '@App/emails/register-success.html.twig' from: billing@test.com # optional From for this config
2. Usage:
$mailer = $this->container->get('youshido.mailer'); $mailer->sendEmailWithId('registration_success', 'user@test.com', ['name' => 'Alex']); $mailer->sendEmailWithId('personal_reminder', 'user@test.com', ['name' => 'Alex']);