Giter VIP home page Giter VIP logo

Comments (2)

nacho-villanueva avatar nacho-villanueva commented on August 17, 2024

In the PostmarkServiceProvider.php I found that the message_stream_id is always being fetched from the mailer named 'postmark', as you can see below.

public function boot(): void
    {
        $this->loadViewsFrom(__DIR__.'/../resources/views', 'postmark');

        $this->app['mail.manager']->extend('postmark', function () {
            $config = $this->app->make('config');

            return new PostmarkTransport(
                $this->app->make(Factory::class),
                $config->get('mail.mailers.postmark.message_stream_id'),
                $config->get('services.postmark.token'),
            );
        });
    }

As a work around, I solved it be creating a new Transport in my AppServiceProvider, but probably it should be changed in the repo. Here is my change:

        Mail::extend('postmark-broadcast', function ($config) {
            $globalService = $this->app->make('config');
            return new PostmarkTransport(
                $this->app->make(Factory::class),
                $config['message_stream_id'],
                $globalService->get('services.postmark.token'),
            );
        });

Cheers!

from laravel-postmark.

craigpaul avatar craigpaul commented on August 17, 2024

Hey @nacho-villanueva! Great catch, thank you! This is resolved in v3.0.4 with 50147a4

from laravel-postmark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.