8000 Cannot see Recipients(from Envelope) on Email during development - symfony/web-profiler-bundle · Issue #47889 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Cannot see Recipients(from Envelope) on Email during development - symfony/web-profiler-bundle #47889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Anastasios89 opened this issue Oct 17, 2022 · 5 comments

Comments

@Anastasios89
Copy link

Symfony version(s) affected

4.4

Description

mailer:
    envelope:
        recipients:

During development recipients from envelope cannot be seen.

How to reproduce

mailer:
    envelope:
        recipients: ['%env(DEV_EMAILS_REDIRECT_TO)%']

Possible Solution

                                            {% if event.envelope.recipients|length > 0 %}
                                                <span class="label">Recipients</span>
                                                {% for recipient in event.envelope.recipients %}
                                                    <pre class="prewrap">{{ recipient.address }}</pre>
                                                {% endfor %}
                                            {% endif %}

after line 132:

{{ (message.headers.get('to').bodyAsString() ?? '(empty)')|replace({'To:': ''}) }}

Additional Context

No response

@Anastasios89 Anastasios89 changed the title Cannot see Recipients(from Envelope) on Email during development Cannot see Recipients(from Envelope) on Email during development - symfony/web-profiler-bundle Oct 17, 2022
@Anastasios89
Copy link
Author

Possible solution on vendor/symfony/web-profiler-bundle/Resources/views/Collector/mailer.html.twig file

@xabbuh
Copy link
Member
xabbuh commented Oct 17, 2022

Can you create a small example application that allows to reproduce your issue?

@xabbuh
Copy link
Member
xabbuh commented Oct 17, 2022

By the way, the To header and the envelope are two different things.

@raziel057
Copy link
Contributor

It have been added in 6.1: #45765

@xabbuh
Copy link
Member
xabbuh commented Oct 17, 2022

Oh, I did not notice 6D7A the 4.4. Thanks for the heads up. Let’s close here then.

@xabbuh xabbuh closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0