Replies: 3 comments 1 reply
-
Something like this, but with headers? https://laravel.com/docs/10.x/mail#using-a-global-from-address |
Beta Was this translation helpful? Give feedback.
-
+1 to this. It would be very useful for ignoring auto responders for example. Symfony recommends adding the following to suppress auto responders https://symfony.com/doc/current/mailer.html#message-headers
The current config seems to be used via this Weirdly https://github.com/illuminate/mail/blob/master/Mailer.php does not seem to reference headers in anyway. I think @createSymfonyTransport https://github.com/illuminate/mail/blob/5a43f89030f3fa7ac1cd7da8a48b2ad7428b61c0/MailManager.php#L152 would be the best place for it. If you look at the AWS SES one it accepts the entire But it's all a little too opaque for someone like me to try and submit a pull request and would likely be a very big change in order to satisfy the vast range of transports available. |
Beta Was this translation helpful? Give feedback.
-
In the mean time if you are using mailables you could just have a BaseMailable that all your other mailables extend.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there currently a way to configure some default email headers for all emails from an app, similar to setting the
config/mail.php
from address/name?This would be pretty handy for something like Mailpit serving a couple in-development applications: you can include an
X-Tags
header and it will sort the emails it captures by application.Since you can send mail in a few ways (mailables,
Mail::to(...)->...
, notifications), it seems like this might be something that would be easiest to manage in the config.Thoughts? I don't want to try to implement something if somebody has a good one-liner for a service provider that solves this perfectly 😅
Beta Was this translation helpful? Give feedback.
All reactions