parameters:
    darvin_utils.mailer.class: Darvin\Utils\Mailer\Mailer

services:
    darvin_utils.mailer:
        class: "%darvin_utils.mailer.class%"
        arguments:
            - "@logger"
            - "@request_stack"
            - "@mailer"
            - "@translator"
            - "%darvin_utils.mailer.charset%"
            - "%darvin_utils.mailer.from%"

parameters:
    darvin_utils.mailer.class: Darvin\Utils\Mailer\Mailer

services:
    darvin_utils.mailer:
        class: "%darvin_utils.mailer.class%"
        arguments:
            - "@logger"
            - "@request_stack"
            - "@?mailer"
            - "@translator"
            - "%darvin_utils.mailer.charset%"
            - "%darvin_utils.mailer.from%"

Make Swift Mailer optional (if missing mail will not be sent).
Make Swift Mailer optional (if missing mail will not be sent).
