multiple mail configurations

后端 未结 7 678
遇见更好的自我
遇见更好的自我 2020-11-28 07:13

I configured laravel\'s mail service with mandrill driver. No problems here!

Now, at certain point of my application, I need to send a mail via gmail.

I did

7条回答
  •  隐瞒了意图╮
    2020-11-28 07:56

    Even easier it is to execute following code, just before sending an email, after you have written over the mail-configuration with config :

    app()->forgetInstance('swift.transport');
    app()->forgetInstance('swift.mailer');
    app()->forgetInstance('mailer');
    

提交回复
热议问题