symfony/sendinblue-mailer
Symfony Mailer transport for Sendinblue/Brevo. Send transactional emails through the Brevo API using Symfony’s mailer component, with simple configuration and seamless integration for Symfony apps and any PHP project using Symfony Mailer.
symfony/mailer or symfony/http-client) or those requiring Sendinblue’s advanced features (templates, SMTP relay, analytics).Mail facade is Symfony Mailer-compatible (via symfony/mailer), so this package can integrate seamlessly if the app uses Symfony’s transport layer. For vanilla Laravel, minimal refactoring is needed (e.g., swapping SwiftMailer for Symfony Mailer).Dsn in .env).symfony/mailer (≥6.0) and symfony/http-client (≥5.0). Laravel 9+ apps can use these via Composer.Mailable classes will work if the app uses Symfony’s Transport (e.g., Mailer::getTransport()).sent, opened) must be mapped to Laravel’s Event system (e.g., via Illuminate\Bus\Dispatcher).^6.0 in composer.json.Route::post('/sendinblue-webhook')). Firewall/rate-limiting must be configured.{!! $variable !!}) must be pre-rendered or handled via API variables.Mail facade? If the latter, what’s the migration effort to Symfony?messageSent) critical for business logic? If so, how will they be routed in Laravel?Mail facade.
composer require symfony/mailer symfony/http-client..env:
MAIL_MAILER=symfony
MAILER_DSN=sendinblue://default:api_key@default
config/mail.php to use Symfony’s transport:
'default' => [
'transport' => env('MAILER_DSN'),
],
Mail facade but use Symfony’s transport for Sendinblue-specific emails.
Transport based on conditions.Mailable:
public function build()
{
return $this->subject('Welcome')
->sendinblueTemplateId(12345)
->with([
'name' => 'John',
]);
}
htmlContent.symfony/mailer and symfony/http-client to composer.json..env and config/mail.php as above.Mailable class using Sendinblue’s transport.Mailable classes to use sendinblueTemplateId().Route::post('/sendinblue-webhook', [SendinblueWebhookHandler::class, 'handle']);
sent, opened, etc.:
class SendinblueWebhookHandler {
public function handle(Request $request) {
event(new SendinblueEmailEvent($request->json()->all()));
}
}
symfony/mailer:^5.4 (adjust composer.json constraints).transactionalEmails, smtpEmail).Mailable classes are backward-compatible if using Symfony’s transport.PHPMailer) will need refactoring to use Symfony’s Transport.symfony/mailer and symfony/http-client for updates (quarterly checks).composer.json to avoid surprises (e.g., ^6.0).Mail facade if hybrid approach is used.failed_jobs table.ngrok for local testing).| **
How can I help you explore Laravel packages today?