惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
The GitHub Blog
The GitHub Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
博客园_首页
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
T
The Blog of Author Tim Ferriss
The Cloudflare Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
CF7 Brevo Integration Adds Contacts But Never Sends the W...
Rahul Sharma · 2026-06-22 · via DEV Community

A site owner posted on the WordPress support forums with a problem that was driving them crazy. Their CF7 form was connected to Brevo using CF7's built-in integration. Contacts were being added to the Brevo list perfectly after every form submission. But the welcome email was never being sent. Brevo support confirmed they were receiving no email send request at all from the website.

The CF7 plugin author suggested deactivating all plugins and switching to the default theme. On a live production site, that is not a realistic option. The thread was left unresolved.

The real reason this happens has nothing to do with plugin conflicts. It is a gap in what CF7's built-in Brevo integration actually does.

What CF7's Built-In Brevo Integration Actually Does

CF7 added native Brevo integration as a built-in feature. When you configure it and a form is submitted, CF7 makes an API call to Brevo to add the contact to your selected list.

That API call goes to Brevo's contacts endpoint:

POST https://api.brevo.com/v3/contacts

This call creates or updates the contact in your Brevo account and adds them to the specified list. It works. The site owner confirmed contacts were appearing in Brevo correctly.

But sending a welcome email using a transactional template is a completely different operation. It requires a separate API call to Brevo's transactional email endpoint:

POST https://api.brevo.com/v3/smtp/email

This second call does not happen. CF7's built-in Brevo integration only makes the contacts call. It does not make the transactional email call. There is no bug here. It is simply a feature that the built-in integration does not include.

Why the Welcome Email Option Exists But Does Not Work

CF7's Brevo settings panel includes a "Send a welcome email" checkbox. The existence of this option implies that checking it will send the welcome email. But based on Brevo's own confirmation that no email send request is reaching their servers, this option either does not trigger the transactional email API call or only works under specific conditions that are not documented.

The most likely explanation is that this setting was intended to work alongside Brevo's double opt-in confirmation email feature, not with a custom transactional template. Brevo has a built-in confirmation email mechanism tied to lists, which is separate from sending a transactional template with a specific template ID. The checkbox in CF7 may only activate the Brevo list-level confirmation email, not a custom template send.

How to Actually Send a Welcome Email After CF7 Submission

To send a welcome email using a specific Brevo transactional template after a CF7 submission, you need to make the second API call yourself. The cleanest way to do this is with a PHP function that hooks into CF7's submission event.

add_action('wpcf7_before_send_mail', 'send_brevo_welcome_email');

function send_brevo_welcome_email($contact_form) {
    if ((int) $contact_form->id() !== YOUR_FORM_ID) return;

    $submission = WPCF7_Submission::get_instance();
    if (!$submission) return;

    $data  = $submission->get_posted_data();
    $email = sanitize_email($data['your-email'] ?? '');
    $name  = sanitize_text_field($data['your-name'] ?? '');

    if (empty($email)) return;

    $api_key     = defined('BREVO_API_KEY') ? BREVO_API_KEY : '';
    $template_id = 12; // replace with your Brevo template ID

    $response = wp_remote_post('https://api.brevo.com/v3/smtp/email', [
        'headers' => [
            'api-key'      => $api_key,
            'Content-Type' => 'application/json',
        ],
        'body' => wp_json_encode([
            'templateId' => $template_id,
            'to'         => [['email' => $email, 'name' => $name]],
            'params'     => [
                'FIRSTNAME' => $name,
            ],
        ]),
        'timeout' => 15,
    ]);

    if (is_wp_error($response)) {
        error_log('[CF7->Brevo] Welcome email failed: ' . $response->get_error_message());
    }
}

Add your API key to wp-config.php:

define('BREVO_API_KEY', 'your-brevo-api-key-here');

Your template ID is the number that appears in Brevo under Email Templates when you open the template you want to use.

The params object lets you pass personalisation variables into your Brevo template. If your template uses {{ params.FIRSTNAME }}, the value you pass in params.FIRSTNAME will be substituted in.

The No-Code Option

If you do not want to manage PHP code, Contact Form to API lets you connect CF7 directly to Brevo's transactional email endpoint from the WordPress dashboard. You set the API endpoint, add your Brevo API key as the api-key header, configure the JSON body with your template ID and the CF7 fields mapped to the to and params values, and the welcome email fires automatically on every form submission.

This gives you the same result as the custom PHP approach without writing or maintaining any code. And because it calls the transactional email endpoint directly, you know the welcome email request is actually being sent to Brevo rather than silently not firing.

Quick Check: Is Your Template Actually Active?

Before assuming the integration is the problem, confirm one thing in Brevo. Go to Email Templates and open the template you want to use. Check that the status shows as Active. Brevo will not send emails for draft or inactive templates even if the API call reaches them. The site owner in the forum confirmed their template was active, but this is the first thing to verify if you are debugging this issue yourself.

Summary

CF7's built-in Brevo integration adds contacts successfully but does not make the separate API call needed to send a transactional welcome email. The "Send a welcome email" checkbox in CF7's settings does not trigger a transactional template send. To actually send a Brevo welcome email on CF7 form submission, you need either a custom PHP function that calls POST /v3/smtp/email or a plugin like Contact Form to API that handles that call from a configuration interface.