-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
Calling From() in Build() to override globalFrom in Mailing #321
Comments
Found some free time today to take a stab - I think it was pretty easy (basically just swapping the null coalescing precedence on what was Issue I'm having is writing tests:
I'm assuming we want tests for at least SmtpMailer or FileLogMailer (if not both). Here are a few options as I see them, not mutually exclusive:
Hope this all makes sense, let me know if you have any suggestions. |
Thanks for looking into this. I'm okay with adding some public getters, as long as we keep the setters private. Notably, for the SMTP Mailer this is needed for the tests to work. For the FileLogMailer, if you want to check the headers that would work 👍 I'm indifferent about the AssertMailer since it's more-or-less a testing tool vs. production thing. Let me know if there's anything that I missed, etc. Thanks! |
This is fixed in Mailer 6.0.0. https://docs.coravel.net/Mailing/#sender |
Describe the solution you'd like
Calling
.From("[email protected]")
inBuild()
doesn't seem to override the globalFrom address. As discussed in #320 it's better if calling.From()
would override the globalFrom mailbox. Essentially this would mean that globalFrom acts more as a default from address that can easily be overridden conditionally or on a Mailable implementation basis.I can work on this one and #320 together. Might be a couple of days before I get to it.
The text was updated successfully, but these errors were encountered: