Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to log the actual transport used with Symfony Mailer and Monolog?#61030

Unanswered
sdespont asked this question inQ&A
Discussion options

Hello,

I am using Symfony Mailer with two configured transports:

framework:    mailer:        transports:            main: '%env(MAILER_DSN)%'            tracking: '%env(MAILER_DSN_MONOLOG)%'

After reading theSymfony Mailer documentation, I could not find a way tolog which transport was actually used for sending each email when using custom X-Transport header.

I have enabled a dedicated Monolog channel for mailer logs:

monolog:    channels: ['mailer']

But this only logs basic email info, not the actual transport name or DSN that was used to send the message.

How can I reliably log the transport used for each email (including the transport alias or DSN) using Monolog or an event subscriber?

Thank you for your help!

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@sdespont

[8]ページ先頭

©2009-2025 Movatter.jp