Mail V3 - new config

Hi,

With V2, this plugin was working well SendGrid plugin - October CMS

With V3, it doesn’t. I have this error : Unsupported mail transport [sendgrid].

The repo has been archived on 2022, so contacting the author might not help.

Here is my configuration below;

config/mail.php

'mailers' => [
        'smtp' => [
            'transport' => 'smtp',
            'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
            'port' => env('MAIL_PORT', 587),
            'encryption' => env('MAIL_ENCRYPTION', 'tls'),
            'username' => env('MAIL_USERNAME'),
            'password' => env('MAIL_PASSWORD'),
            'timeout' => null,
            'auth_mode' => null,
        ],

        'ses' => [
            'transport' => 'ses',
        ],

//SKIPPING SOME LINE HERE AND THEN :

        'sendgrid' => [
            'transport' => 'sendgrid',
        ],
],	

config/services.php

return [

    'mailgun' => [
        'domain' => env('MAILGUN_DOMAIN'),
        'secret' => env('MAILGUN_SECRET'),
        'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
    ],

   //SKIPPING SOME LINE HERE...

    'sendgrid' => [
        'api_key' => env('SENDGRID_API_KEY'),
    ],

];

Anyone has an idea / direction ? I don’t think it should be that complicated - but I spent the whole day on that.

I tried the laravel package s-ichikawa/laravel-sendgrid-driver as well. It’s not working very well. There is something with rendering the templates.

Thank you!

Hi @apinard

Here is an example of building a mail driver plugin. It imports a Laravel package and extends the mail settings to include the driver.

1 Like

Plugin created. I’ve submitted it so it might helps others too.

Thank you.

2 Likes