PHP code example of survos / brevo-bundle
1. Go to this page and download the library: Download survos/brevo-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
survos / brevo-bundle example snippets
public function __construct(private Brevo $brevo) {}
$this->brevo->contacts->getLists();
#[AsEventListener]
public function onBrevo(BrevoMailEvent $event): void
{
if ($event->isSuppression) { // hard bounce, spam complaint, unsubscribe
$this->suppress($event->email, $event->name, $event->messageId);
}
}