youshido / mail
Symfony Budnle for Email templates, variables and attachments integration
Installs: 1 691
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Type:symfony-bundle
Requires
- php: >=5.6
- symfony/framework-bundle: ~3.1
- symfony/swiftmailer-bundle: ^2.4
This package is not auto-updated.
Last update: 2024-11-23 20:20:30 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']);