Send WordPress email with Brevo
Authenticate your sending domain in Brevo, generate an SMTP key, then send through smtp-relay.brevo.com on port 587.

How it works
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php';
$mail = new PHPMailer(true);
try {
$mail->isSMTP();
$mail->Host = 'smtp-relay.brevo.com';
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = 'YOUR_SMTP_KEY';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;
$mail->setFrom('[email protected]', 'My App');
$mail->addAddress('[email protected]', 'John Doe');
$mail->addReplyTo('[email protected]', 'Support');
$mail->Subject = 'Your order is confirmed';
$mail->Body = 'Hello John, your order #12345 has been received.';
$mail->send();
echo 'Email sent successfully';
} catch (Exception $e) {
echo "Error: {$mail->ErrorInfo}";
}
curl --request POST \
--url https://api.brevo.com/v3/smtp/email \
--header 'accept: application/json' \
--header 'api-key:YOUR_API_KEY' \
--header 'content-type: application/json' \
--data '{
"sender":{
"name":"Alex from Brevo",
"email":"[email protected]"
},
"to":[
{
"email":"[email protected]",
"name":"John Doe"
}
],
"subject":"Hello from Brevo!",
"textContent":"Hello. This is my first transactional email sent from Brevo."
}'
The PHP panel sends through the SMTP relay with PHPMailer. The cURL panel sends a transactional email with the REST API.
Ask your AI agent
Connect your AI tool to the Brevo MCP server at https://mcp.brevo.com/v1/brevo/mcp, then ask it to check your account before you send.
Before I send email from my WordPress app, check that I have a verified sender and an authenticated sending domain. List what is missing.
Read-only: it reads your Brevo account through the Brevo MCP server and changes nothing.
Set it up
Authenticate your domain
Add your domain in Brevo. The DNS records Brevo asks for include DKIM, a Brevo code and DMARC. Authentication can take up to 24 to 48 hours to propagate. Then create a sender email on that domain.
Generate an SMTP key
Open SMTP and API settings. Under the SMTP tab, copy existing credentials or generate new ones. Use an SMTP key, not an API key, for SMTP relay connections.
Enter the settings
Use host smtp-relay.brevo.com and port 587 or 2525. Port 465 needs SSL or TLS. Leave encryption empty unless you use 465.
Send a test and check the log
Enter an email address to send a test email. Check delivery in Brevo > Transactional > Email logs.



