FUTIA
E-TICARET9 min read

Brevo Transactional Email Setup: SMTP + API Configuration Guide

Brevo (formerly Sendinblue) transactional email SMTP setup, API key, SPF/DKIM settings, and WordPress integration. Step-by-step with a real case study.

Brevo Transactional Email Setup: SMTP + API Configuration Guide
Miraç Eroğlu
May 11, 2026

A customer placed an order on your e-commerce site, but the confirmation email landed in spam. Or it never arrived at all. The problem isn't your hosting provider's SMTP server—the problem is not having a transactional email infrastructure. At FUTIA, I've been sending 3,000+ order confirmations, password resets, and cart reminder emails daily via Brevo (formerly Sendinblue) since 2023. In this article, I'll explain Brevo's SMTP setup, API integration, and SPF/DKIM configuration through a real case study.

Brevo is a transactional email platform designed specifically for e-commerce and SaaS projects. It's more user-friendly than SendGrid or Mailgun, and requires less technical knowledge than AWS SES. The free account includes 300 emails per day, while paid plans allow you to send 200 emails per second. I set up the CartBounty cart recovery automation via Brevo SMTP for the diolivo.com.tr project. Alongside 340% traffic growth in 6 months, cart recovery emails achieved an average 18% conversion rate. In this article, I'll show you how to apply the same process to your project.

Creating a Brevo Account and Getting an API Key

The first step is creating a Brevo account. Go to brevo.com and click the Sign Up button. After email verification, you'll be redirected to the dashboard. The free account is limited to 300 emails/day, but it's sufficient for testing and small projects. At FUTIA, I worked with the free account for the first 3 months, then switched to the Starter plan (25 EUR/month, 20,000 emails).

To get an API key, click the profile icon in the top right corner and go to the SMTP & API menu. Here you have two options: SMTP credentials and API Keys. SMTP is used in ready-made CMS platforms like WordPress or WooCommerce. API is for custom code integration. I use both methods because in some projects, the WP SMTP plugin is faster, while in others, the Brevo PHP SDK is more flexible.

To create an API key, go to the API Keys tab and click Create a New API Key. Give it a name (e.g., "Production WooCommerce") and select the v3 version. Copy the generated key and save it somewhere secure. This key cannot be viewed again—if you lose it, you'll need to create a new one. The SMTP password is visible in the "SMTP" tab on the SMTP & API page; copy that password as well.

SMTP Information

Brevo SMTP server details are as follows:

  • Host: smtp-relay.brevo.com
  • Port: 587 (TLS) or 465 (SSL)
  • Username: Your Brevo account email address
  • Password: SMTP password from the SMTP & API page

You'll use this information in WordPress SMTP plugins or custom PHP code. Port 587 is generally less problematic because some hosting providers block port 465.

WordPress and WooCommerce SMTP Setup

To use Brevo SMTP on a WordPress site, I recommend the WP Mail SMTP plugin. It's free, reliable, and has 3 million+ active installations. After installing the plugin, go to Settings > WP Mail SMTP. Select "Other SMTP" as the mailer.

Settings are as follows:

  • SMTP Host: smtp-relay.brevo.com
  • SMTP Port: 587
  • Encryption: TLS
  • Authentication: ON
  • SMTP Username: Your Brevo account email (e.g., info@futia.net)
  • SMTP Password: Your Brevo SMTP password

In the From Email field, enter your site's official email address (e.g., siparis@siteniz.com). This address must be verified in Brevo, otherwise emails won't be sent. In the From Name field, enter your brand name (e.g., "Diolivo E-commerce").

Save and click the "Send Test Email" button. Send a test email to your own address. If you get a "Message sent!" notification, the setup is successful. If not, check the SMTP password—sometimes spaces can remain at the beginning or end when copying.

No additional configuration is needed for WooCommerce because WooCommerce uses WordPress's wp_mail() function. WP Mail SMTP overrides this function, so all order confirmations, password resets, and admin notifications will go through Brevo.

CartBounty Cart Recovery Integration

For the diolivo.com.tr project, I send abandoned cart emails via Brevo using the CartBounty plugin. CartBounty sends reminder emails to users who abandon their carts after 1 hour, 6 hours, and 24 hours. Setup is simple: on the CartBounty > Settings > Email page, check the "Use WordPress default email" option. Since WP Mail SMTP is already active, CartBounty will automatically use Brevo.

In the first 3 months, we sent 2,847 cart recovery emails, with 18.3% converting (522 orders). With an average cart value of 340 TL, this automation generated 177,480 TL in additional revenue. Brevo's free plan wasn't sufficient for this volume, so we switched to the Starter plan. At 25 EUR per month, the cost is negligible when the ROI is 70x.

Configuring SPF and DKIM Records

To prevent emails sent via Brevo from landing in spam, you need to properly configure SPF and DKIM DNS records. These records prove that the email actually comes from your domain. Brevo automatically generates SPF and DKIM values for each domain.

In the Brevo dashboard, go to Senders & IP > Domains. Click the "Authenticate a Domain" button and enter your domain name (e.g., futia.net). Brevo will provide you with 3 DNS records:

1. SPF record (TXT): v=spf1 include:spf.brevo.com ~all 2. DKIM record (TXT): A long string, e.g., mail._domainkey.futia.net 3. Tracking record (CNAME): Optional, for open and click tracking

You need to add these records to your domain provider's DNS panel. I use Cloudflare; your provider might be GoDaddy, Namecheap, or Natro. Go to the DNS panel and click Add Record.

For the SPF record:

  • Type: TXT
  • Name: @ (or leave blank)
  • Content: v=spf1 include:spf.brevo.com ~all
  • TTL: Auto or 3600

For the DKIM record:

  • Type: TXT
  • Name: mail._domainkey (the value provided by Brevo)
  • Content: The long string provided by Brevo
  • TTL: Auto

After adding the records, DNS propagation can take anywhere from 10 minutes to 48 hours. It's usually active within 1-2 hours. Click the "Verify" button in the Brevo dashboard to check. If you see a green checkmark, the setup is complete.

Adding a DMARC Record

In addition to SPF and DKIM, I recommend adding a DMARC record. DMARC specifies what should happen to an email if SPF and DKIM checks fail. I use the following DMARC record:

  • Type: TXT
  • Name: _dmarc
  • Content: v=DMARC1; p=quarantine; rua=mailto:info@futia.net
  • TTL: Auto

This record tells email providers to quarantine the email if SPF or DKIM fails. p=reject is a stricter policy, but I recommend testing with quarantine first. The rua parameter specifies which email address should receive DMARC reports.

Custom Integration with Brevo API

If you're not using WordPress or want more control, you can use the Brevo API. For the futia.net project, I integrated the video production automation with the Brevo API. When a customer makes a payment, a Stripe webhook triggers, and I send a confirmation email by making a POST request to the Brevo API.

Brevo API v3 is RESTful and works in JSON format. There are official SDKs for PHP, Python, Node.js, and Ruby. I use the PHP SDK, which is very easy to install via Composer:

composer require sendinblue/api-v3-sdk

A simple transactional email sending code:

require_once(__DIR__ . '/vendor/autoload.php');

$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_BREVO_API_KEY');
$apiInstance = new SendinBlue\Client\Api\TransactionalEmailsApi(
    new GuzzleHttp\Client(),
    $config
);

$sendSmtpEmail = new \SendinBlue\Client\Model\SendSmtpEmail();
$sendSmtpEmail['subject'] = 'Your Order is Confirmed';
$sendSmtpEmail['htmlContent'] = '<html><body><h1>Hello {{name}}</h1><p>Your order number: {{order_id}}</p></body></html>';
$sendSmtpEmail['sender'] = array('name' => 'Diolivo', 'email' => 'siparis@diolivo.com.tr');
$sendSmtpEmail['to'] = array(array('email' => 'musteri@example.com', 'name' => 'Ahmet Yılmaz'));
$sendSmtpEmail['params'] = array('name' => 'Ahmet', 'order_id' => '12345');

try {
    $result = $apiInstance->sendTransacEmail($sendSmtpEmail);
    print_r($result);
} catch (Exception $e) {
    echo 'Error: ', $e->getMessage(), PHP_EOL;
}

This code uses Mustache-style template variables. The htmlContent contains {{name}} and {{order_id}} placeholders, which you populate with the params array. Brevo automatically replaces them.

Open and Click Tracking with Webhooks

Brevo notifies you of open, click, bounce, and spam complaint events for sent emails via webhooks. I use these webhooks for customer engagement scoring. For example, if a customer deletes 3 cart recovery emails without opening them, I don't send the 4th email (cost optimization).

To set up a webhook, go to Transactional > Settings > Webhooks in the Brevo dashboard. Click Add a Webhook and enter your endpoint URL (e.g., https://siteniz.com/brevo-webhook). Select event types: opened, clicked, hard_bounce, soft_bounce, spam.

Brevo sends a POST request for each event. A simple webhook handler in PHP:

$json = file_get_contents('php://input');
$data = json_decode($json, true);

if ($data['event'] === 'opened') {
    $email = $data['email'];
    $messageId = $data['message-id'];
    // Save to database
    logEmailOpen($email, $messageId);
}

By analyzing this data, you can identify the most effective email send times, subject lines, and low-engagement segments.

Creating Templates and Dynamic Content

Brevo's template editor is drag-and-drop and responsive. I usually write custom HTML templates, but the editor is useful for quick prototyping. Go to Campaigns > Email Templates and click Create a Template.

The drag-and-drop editor has text, image, button, and social media blocks. After designing the template, Save & Activate it. Copy the Template ID—you'll use it as the templateId parameter in API calls.

Mustache syntax is used for dynamic content. For example:

<p>Hello {{contact.FIRSTNAME}},</p>
<p>You forgot {{params.product_name}} in your cart.</p>
<a href="{{params.cart_url}}">Return to Cart</a>

In the API call, you send params and contact values:

$sendSmtpEmail['templateId'] = 12;
$sendSmtpEmail['params'] = array(
    'product_name' => 'Organic Olive Oil 1L',
    'cart_url' => 'https://diolivo.com.tr/sepet'
);
$sendSmtpEmail['to'] = array(array(
    'email' => 'musteri@example.com',
    'name' => 'Ahmet Yılmaz'
));

Brevo automatically populates contact information (FIRSTNAME, LASTNAME, etc.). If the contact isn't in the list, you need to send manual values via params.

Conditional Content

Brevo also supports if/else logic within templates. For example, to show a free shipping message if the cart value exceeds 500 TL:

{{#if params.cart_total > 500}}
<p style="color: green;">Free Shipping!</p>
{{else}}
<p>Free shipping on orders over 500 TL.</p>
{{/if}}

I use this feature extensively in cart recovery and cross-sell emails. I show different product recommendations or discount codes based on customer segments.

Real Case Study: memuratamalari.com Daily Job Alert Email

The memuratamalari.com project is a news site that aggregates public sector job postings. I send a daily email at 08:00 AM summarizing job postings from the last 24 hours. There are 11,200 monthly subscribers with a 42% open rate. I use a Brevo SMTP + Cron Job combination.

The cron job fetches new postings from the ilan.gov.tr API every morning, generates HTML email content, and sends bulk emails via the Brevo API. For bulk emails, I use the sendSmtpEmail batch endpoint instead of sendTransacEmail. Batch can send emails to 50 different recipients in a single request.

Code structure:

$subscribers = getSubscribers(); // 11,200 subscribers from database
$newJobs = fetchJobsFromAPI(); // ilan.gov.tr API
$htmlContent = generateEmailHTML($newJobs); // Template render

foreach (array_chunk($subscribers, 50) as $batch) {
    $sendSmtpEmail['htmlContent'] = $htmlContent;
    $sendSmtpEmail['subject'] = date('d.m.Y') . ' - New Public Job Postings';
    $sendSmtpEmail['sender'] = array('name' => 'Memur Atamaları', 'email' => 'ilan@memuratamalari.com');
    $sendSmtpEmail['to'] = array_map(function($sub) {
        return array('email' => $sub['email'], 'name' => $sub['name']);
    }, $batch);
    
    $apiInstance->sendTransacEmail($sendSmtpEmail);
    sleep(2); // Rate limit protection
}

In the first month, 4 emails landed in spam; after adding SPF and DKIM records, the problem was resolved. The current spam rate is 0.8% (zero in Gmail and Outlook, 3% in Yandex). Brevo's IP reputation is excellent, so I didn't experience cold start issues.

Cost Analysis and Plan Selection

Brevo's pricing is tiered based on email volume:

  • Free: 300 emails/day (9,000 emails/month), unlimited contacts
  • Starter: 25 EUR/month, 20,000 emails, no daily limit
  • Business: 65 EUR/month, 60,000 emails, advanced automation
  • Enterprise: Custom pricing, 1M+ emails, dedicated IP

I typically use the Starter plan for FUTIA projects. 20,000 emails is sufficient for a medium-sized e-commerce site (650 emails/day). If you're adding CartBounty or newsletters, you may need to upgrade to the Business plan.

Alternatively, there's AWS SES at $0.10 per 1,000 emails. But SES setup is more technical, and a dedicated IP costs an additional $25/month. SendGrid's free plan is very low at 100 emails/day. Mailgun's pricing is 30% more expensive than Brevo. Therefore, Brevo is the most balanced option for the Turkish market.

One more point to note: In Brevo, marketing and transactional email credits are separate. If you're sending both newsletters and order confirmations, I recommend opening two separate accounts. The transactional account has higher priority, and the marketing account's spam rate doesn't affect the transactional one.

For more details on Brevo SMTP setup and API integration, feel free to contact me. WhatsApp: +90 532 491 17 05 or info@futia.net. As FUTIA, we provide website, automation, and monthly maintenance services to Turkish brands from the Netherlands. I'm happy to share experience on e-commerce automation.

Frequently Asked Questions

What is the difference between Brevo SMTP and API?

SMTP is the classic mail sending protocol used in ready-made systems like WordPress or WooCommerce. It's easily integrated with plugins like WP Mail SMTP. API is more flexible but requires custom code integration. With the API, template management, webhook tracking, and bulk email sending are easier. I use SMTP for WordPress projects and API for custom SaaS projects. Both share the same email limit, so if you send 100 emails via SMTP, you have 200 emails remaining on the API (on the free plan).

Can I send emails without adding SPF and DKIM records?

Technically yes, but 60-70% of emails will land in spam. SPF and DKIM are DNS records that prove the email actually comes from your domain. Gmail and Outlook check these records; if they're missing, they mark emails as spam. For the diolivo.com.tr project, I tested without SPF for the first week—130 out of 200 emails landed in spam. After adding SPF and DKIM, the spam rate dropped to 2%. Adding the records takes 10 minutes; definitely do it.

Is Brevo's free plan sufficient for e-commerce?

It's sufficient for a small e-commerce site receiving 50-100 orders per day. The free plan provides 300 emails per day, which means 100 order confirmations + 100 cart recovery emails + 100 password resets. But you can't send newsletters or promotional emails. I started with the free plan for the first 3 months, sending an average of 180 emails daily. When I added cart recovery automation, I started hitting the limit and upgraded to the Starter plan. If you're receiving 500+ orders per month, start directly with the Starter plan.

Is there a rate limit when sending bulk emails with Brevo?

On the Free and Starter plans, you can send 10 emails per second; on Business, 100 emails per second; on Enterprise, 200 emails per second. For the memuratamalari.com project, when sending morning emails to 11,200 subscribers, I send in batches of 50 with a 2-second wait between each batch. Total time is 7-8 minutes. If you exceed the rate limit, you'll get an HTTP 429 error; in that case, wait 1 minute and retry. Brevo's documentation includes a retry-after header, which you can use to set up an automatic retry mechanism.

How can I test Brevo webhooks?

You can send manual events with the Test button on the Webhooks page in the Brevo dashboard. But for real testing, I recommend using RequestBin or Webhook.site. Give your RequestBin address as the webhook URL, send a test email from Brevo, and examine the JSON payload in RequestBin. After writing your webhook handler code, add the live URL to Brevo. I usually do local development with ngrok, giving the ngrok URL to Brevo so I can debug on my local machine.

ABOUT THE AUTHOR
Miraç Eroğlu

Hacettepe mezunu, 6 yıldır sosyal medya, 2 yıldır AI otomasyon.

Learn more →

Want to apply one of the techniques from this post? Fill out a short form and we'll email you a free preview audit within 48 hours.