https://github.com/symfony/brevo-mailer
Symfony Brevo Mailer Bridge
https://github.com/symfony/brevo-mailer
component php symfony symfony-component
Last synced: 3 months ago
JSON representation
Symfony Brevo Mailer Bridge
- Host: GitHub
- URL: https://github.com/symfony/brevo-mailer
- Owner: symfony
- License: mit
- Created: 2023-07-09T07:20:43.000Z (about 2 years ago)
- Default Branch: 7.2
- Last Pushed: 2024-11-29T09:11:09.000Z (8 months ago)
- Last Synced: 2025-04-09T15:01:09.762Z (3 months ago)
- Topics: component, php, symfony, symfony-component
- Language: PHP
- Homepage: https://symfony.com/mailer
- Size: 45.9 KB
- Stars: 16
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Brevo Bridge
============Provides Brevo integration for Symfony Mailer.
This was added upon Sendinblue's rebranding to Brevo.Configuration example:
```env
# SMTP
MAILER_DSN=brevo+smtp://USERNAME:PASSWORD@default# API
MAILER_DSN=brevo+api://KEY@default
```where:
- `KEY` is your Brevo API KeyWith API, you can use custom headers.
```php
$params = ['param1' => 'foo', 'param2' => 'bar'];
$json = json_encode(['custom_header_1' => 'custom_value_1']);$email = new Email();
->getHeaders()
->add(new MetadataHeader('custom', $json))
->add(new TagHeader('TagInHeaders1'))
->add(new TagHeader('TagInHeaders2'))
->addTextHeader('sender.ip', '1.2.3.4')
->addTextHeader('templateId', 1)
->addParameterizedHeader('params', 'params', $params)
->addTextHeader('foo', 'bar')
;
```This example allow you to set:
* templateId
* params
* tags
* headers
* sender.ip
* X-Mailin-CustomFor more information, you can refer to [Brevo API documentation](https://developers.brevo.com/reference/sendtransacemail).
Resources
---------* [Contributing](https://symfony.com/doc/current/contributing/index.html)
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)