Skip to content

[DX][Mailer] Simplify the feature to send emails to some address in dev environment #36877

@javiereguiluz

Description

@javiereguiluz

Description
This nice option is very useful while working with emails in dev.

In Symfony 4.2 and earlier versions, you enabled it as follows:

# config/packages/dev/swiftmailer.yaml
swiftmailer:
    delivery_addresses: ['someone@example.com']

In Symfony 4.3 and newer, using the new Mailer, you enable it as follows:

# config/services_dev.yaml
services:
    mailer.dev.set_recipients:
        class: Symfony\Component\Mailer\EventListener\EnvelopeListener
        tags: ['kernel.event_subscriber']
        arguments:
            $sender: null
            $recipients: ['someone@example.com']

If technically possible, could we please make this feature as beautiful and simple as before? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDX = Developer eXperience (anything that improves the experience of using Symfony)FeatureMailer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy