-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use multiple postmark drivers with stream ID in Laravel application #40
Comments
One Addition: I know you can change the mail's header on a But since Postmark's stream, are almost like a different account, it would behandy to define the stream also on a driver-level. |
I already created a PR on Laravel. Let's see if it gets merged: laravel/framework#35755 |
@christophrumpel is this working for you? Im running Laravel 8.32.1 and Im trying to send to different stream without any luck. this is my configuration:
Trying to test like this:
I also tried to add mailer to the Mailable without any luck, all test emails went to default stream. All help appreciated |
Hey, it is working for but I only tested by using my newsletter software Mailcoach where I can select different mailers. Here is my config https://github.com/christophrumpel/christoph-rumpel.com/blob/production/config/mail.php#L61-L83 |
Hmmm. yes under services, but that is what is suggested by the docs. I see you dont have that in your config! Will test by removing it and report back. Thanks for your help |
@oxodesign did you get this to work with changing the mailer? |
No, sorry for late reply |
I'm using a newsletter application (Mailcoach) where you can define two different mail drivers:
Postmark also suggests sending through different streams.
This package lets you define the "Postmark Message Stream" by adding the stream id to the header. But when you use the
postmark
driver in Laravel, you only have the option to define thetoken
seen here: https://github.com/laravel/framework/blob/bd67cc22af6fbc1f5745b0e3ce79e0a12b092048/src/Illuminate/Mail/MailManager.php#L325So even if I create two postmark mail drivers, I could only use a different API token (= 2 different Postmark "servers"), but I cannot define the message stream.
If the above assumptions are correct, I could do a PR on Laravel to also get a
headers
array from theservices.php
config file. What do you think?The text was updated successfully, but these errors were encountered: