laravel-postmark
laravel-postmark copied to clipboard
Batch Email Sending
Postmark has an option for Batch Email sending.
It would be really good if you can add this feature to v3 so we can use Laravel 8 Mailer for our Newsletters.
That's an interesting concept. Not sure how it would work in Laravel yet, but I can definitely look into it. Just for reference, this is the part of the documentation you're referring to, correct?
https://postmarkapp.com/developer/user-guide/send-email-with-api/batch-emails
That's an interesting concept. Not sure how it would work in Laravel yet, but I can definitely look into it. Just for reference, this is the part of the documentation you're referring to, correct?
https://postmarkapp.com/developer/user-guide/send-email-with-api/batch-emails
Yes exactly.
Hi,
I faced the same issue. I was able to send a mass email campaign from our web app by creating a simple command that uses the https://api.postmarkapp.com/email/batch endpoint.
Just in case someone is in a hurry and needs to achieve the same, here is a code example of how I made it:
https://gist.github.com/milardovich/947367309c05b0ddd16ea5c61a2a2207
I know it is not an ideal solution, but I hope it can be helpful for someone.
Thanks
Hi,
I faced the same issue. I was able to send a mass email campaign from our web app by creating a simple command that uses the https://api.postmarkapp.com/email/batch endpoint.
Just in case someone is in a hurry and needs to achieve the same, here is a code example of how I made it:
https://gist.github.com/milardovich/947367309c05b0ddd16ea5c61a2a2207
I know it is not an ideal solution, but I hope it can be helpful for someone.
Thanks
Thank you! Does this use the Laravel Mailer? Where do you place this file?
I have created a command, it should be placed under app/Console/Commands. Then you can execute with artisan: php artisan message-stream:send. Thanks
FWIW I could really use this as well.
My thoughts on how it could work is by providing a facade to define either a mailable or postmark template, one or more email address, optionally define a message stream (default would be broadcast).
Something like this:
PostmarkBulk::mailable(new TosUpdatedMailable)->to(Users::all())->stream('legal-updates')->send();
I would try my hand at making this but honestly I don't know enough about how facades work to feel comfortable trying to build one or even knowing where to start for that matter.
+1