0

We are sending email from our application by mailgun. We are using laravel 5.2.

But we have multiple mailgun domain created to sending email.

'mailgun' => [
    'domain' => env('MAILGUN_DOMAIN'),
    'business_domain' => env('MAILGUN_DOMAIN_FOR_BUSINESS'),
    'secret' => env('MAILGUN_SECRET')
],

Now we wants to send email like this.

  1. Mail::send() this methods sending email by default domain.

  2. But when we wants to create a different facade like MailByBusiness::send() with send email by business domain.

for archiving this functionality, how to override mailgun transport class and make a facade ?

Hasan Hafiz Pasha
  • 1,402
  • 2
  • 17
  • 25
  • This question is very broad for SO, and it is likely to be closed unless you edit it and narrow it down to a specific problem you are having - eg show us what you tried, and where you got stuck. There are plenty of answers here about how to set mail config dynamically, eg https://stackoverflow.com/q/45146260/6089612, https://stackoverflow.com/q/23438342/6089612, https://stackoverflow.com/q/45327955/6089612 ... – Don't Panic Dec 02 '21 at 21:23
  • And there are also many answers about how to create a facade, eg: https://stackoverflow.com/q/35639737/6089612, https://stackoverflow.com/q/50758512/6089612, https://stackoverflow.com/q/38972626/6089612 ... What have you tried? – Don't Panic Dec 02 '21 at 21:23

0 Answers0