jeudi 2 décembre 2021

Override laravel Mailgun Transport for support multiple domain (Laravel 5.2)

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 ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire