Skip to content

Latest commit

 

History

History
25 lines (22 loc) · 866 Bytes

README.md

File metadata and controls

25 lines (22 loc) · 866 Bytes

Mail Bundle

1. Basic config:

youshido_mail:
    config:
        from: [email protected] # 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: [email protected] # 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: [email protected] # optional From for this config

2. Usage:

$mailer = $this->container->get('youshido.mailer');
$mailer->sendEmailWithId('registration_success', '[email protected]', ['name' => 'Alex']);

$mailer->sendEmailWithId('personal_reminder', '[email protected]', ['name' => 'Alex']);