[{"data":1,"prerenderedAt":34},["ShallowReactive",2],{"JlqwPReNWa":3,"YBwVQjNS6N":23},{"data":4},{"id":5,"title":6,"slug":7,"slugs":8,"summary":10,"content":11,"categories":12,"thumbnail":19,"thumbnail_small":20,"created_at":21,"updated_at":22},3,"Laravel 11: Send Emails with the Brevo API Without SMTP","laravel-11-send-emails-with-brevo-api-without-smtp",{"en":7,"fr":9},"envoyer-emails-laravel-11-brevo-api-sans-smtp","Learn how to integrate the Brevo API into Laravel 11 to send transactional emails without SMTP while keeping full compatibility with Laravel Mailables and Notifications.","When working with Laravel, the most common way to send emails through Brevo is by configuring an SMTP server. However, Brevo also provides a transactional API that offers several advantages:\n\n- No SMTP configuration required\n- Improved reliability\n- Faster email delivery\n- Native support for Brevo templates\n- Event tracking (opens, clicks, bounces, etc.)\n\nIn this article, we'll see how to integrate Brevo as a mail transport in Laravel 11 using its API.\n\n## Installing the Required Packages\n\nStart by installing the Symfony Brevo mailer transport and the required HTTP client:\n\n```bash\ncomposer require symfony/brevo-mailer\ncomposer require symfony/http-client\n```\n\n## Creating a Brevo API Key\n\nFrom your Brevo dashboard:\n\n1. Navigate to **SMTP & API**\n2. Open the **API Keys** tab\n3. Create a new transactional API key\n\nYou should receive a key similar to:\n\n```text\nxkeysib-xxxxxxxxxxxxxxxxxxxxxxxx\n```\n\n## Laravel Configuration\n\nAdd your API key to your `.env` file:\n\n```env\nMAIL_MAILER=brevo\n\nBREVO_API_KEY=xkeysib-xxxxxxxxxxxxxxxxxxxxxxxx\n\nMAIL_FROM_ADDRESS=noreply@yourdomain.com\nMAIL_FROM_NAME=\"${APP_NAME}\"\n```\n\nThen update `config/services.php`:\n\n```php\nreturn [\n\n    // ...\n\n    'brevo' => [\n        'key' => env('BREVO_API_KEY'),\n    ],\n\n];\n```\n\n## Registering the Brevo Mail Transport\n\nAdd a new mailer to `config/mail.php`:\n\n```php\n'brevo' => [\n    'transport' => 'brevo',\n],\n```\n\nLaravel does not natively recognize the Brevo transport, so it must be registered manually.\n\nIn `AppServiceProvider.php`:\n\n```php\nuse Illuminate\\Support\\Facades\\Mail;\nuse Symfony\\Component\\Mailer\\Bridge\\Brevo\\Transport\\BrevoTransportFactory;\nuse Symfony\\Component\\Mailer\\Transport\\Dsn;\n\npublic function boot(): void\n{\n    Mail::extend('brevo', function () {\n        return (new BrevoTransportFactory())->create(\n            new Dsn(\n                'brevo+api',\n                'default',\n                config('services.brevo.key')\n            )\n        );\n    });\n}\n```\n\n## Clearing Laravel Cache\n\nAfter updating the configuration, clear Laravel's cache:\n\n```bash\nphp artisan optimize:clear\n```\n\n## Sending a Test Email\n\nYou can now send emails as usual:\n\n```php\nuse Illuminate\\Support\\Facades\\Mail;\n\nMail::raw('Brevo API test', function ($message) {\n    $message->to('contact@example.com')\n        ->subject('Brevo Test');\n});\n```\n\nOr with a Mailable:\n\n```php\nMail::to($user)->send(new WelcomeMail());\n```\n\nNo additional changes are required in your application code.\n\n## Common Errors\n\n### Unsupported mail transport [brevo]\n\nThe transport has not been registered correctly in `AppServiceProvider`, or the `symfony/brevo-mailer` package is missing.\n\n### User is not set\n\nThe `Dsn` constructor is misconfigured. The API key must be passed as the third argument.\n\n### You cannot use AbstractHttpTransport as the HttpClient component is not installed\n\nThe following package is missing:\n\n```bash\ncomposer require symfony/http-client\n```\n\n## Conclusion\n\nUsing Brevo through its API allows you to keep the full Laravel mail ecosystem while benefiting from the performance and features of Brevo's transactional email platform.\n\nOnce configured, your Mailables, Notifications, and queued emails continue to work exactly as they would with SMTP, without requiring any changes to your business logic.",[13],{"id":5,"title":14,"slug":15,"slugs":16,"thumbnail":17,"thumbnail_small":18},"Laravel","laravel",{"en":15,"fr":15},"https://app.tomjamon.com/storage/12/conversions/01JER9785TAJYWQRE60EHP67C4-cover.webp","https://app.tomjamon.com/storage/12/conversions/01JER9785TAJYWQRE60EHP67C4-card.webp","https://app.tomjamon.com/storage/15/conversions/01KT6BXVWDYSYYM25N3QKAPH7C-cover.webp","https://app.tomjamon.com/storage/15/conversions/01KT6BXVWDYSYYM25N3QKAPH7C-card.webp","2026-06-03T09:02:47.000000Z","2026-06-03T09:27:15.000000Z",{"data":24},[25,27],{"id":5,"title":14,"slug":15,"slugs":26,"thumbnail":17,"thumbnail_small":18},{"en":15,"fr":15},{"id":28,"title":29,"slug":30,"slugs":31,"thumbnail":32,"thumbnail_small":33},6,"Nuxt JS","nuxt-js",{"en":30,"fr":30},"https://app.tomjamon.com/storage/10/conversions/01JER91M3YJXF7EHZR75J054MT-cover.webp","https://app.tomjamon.com/storage/10/conversions/01JER91M3YJXF7EHZR75J054MT-card.webp",1792846769281]