Email and broadcasts
Email editor. CRM → Campaigns → “Emails and templates”. Each email is a bos_email entry (not public) edited in the BuilderOS editor with a 600 px canvas and only bos-email/* blocks: header with logo, title, text, image, button, 2 columns, divider, spacer, WooCommerce product (if active) and the legal footer (required and locked: sender, postal address, “Unsubscribe”, “Preferences” and “View in browser”). The items panel shows “Blocks” and “Templates” (8 templates and the saved ones). Colors, fonts (with a safe fallback: web fonts don’t travel), radius and logo come from the site’s Kit; each email can change them in the “Email” bar, which also has the preview (desktop, mobile and plain text), “Send test” and “Save as template”.
Compiler. Builder_OS_Email_Compiler::compile( $bloques, $opts ) returns html, text, links, warnings and size: nested tables with role="presentation" and inline styles, 600 px container with MSO conditionals, “fluid hybrid” columns that stack on mobile, buttons with VML for Outlook, images with width and alt (WebP becomes JPG), color-scheme for dark mode, hidden preheader and plain text. Variables: {{nombre}}, {{apellidos}}, {{email}}, {{empresa}}, {{campo:clave}} and a default value with a pipe ({{nombre|amigo}}). Filters: builder_os_crm_email_kit, builder_os_crm_email_logo, builder_os_crm_email_models.
Campaigns. A 4-step wizard: ① recipients (segments and labels, with exclusions and a live count), ② subject, preheader and design, ③ sender with the domain’s deliverability and the campaign’s tracking, ④ review, pre-calculation (provider, pace and end time), test and “Send now” or “Schedule”. Only subscribed contacts with an email, not deleted and not on suppression receive the campaign; this is checked again right before each send. Building (crm.campaign_build, 1,000 at a time) and sending (crm.campaign_send, batches of 25 over one SMTP connection, filter builder_os_crm_send_batch) go through the queue with the smtp provider: a 421/450/451/452 pauses for 15 min, halves the pace and resumes without repeating or losing any email. Pause, resume and cancel from the progress screen. With visit-based cron the panel warns and doesn’t block; with more than 5,000 recipients over SMTP the button says “Send anyway”. builder_os_crm_campaign_before_build fires before building; builder_os_crm_campaign_sent when done.
Providers. Interface Builder_OS_CRM_Transport and registry Builder_OS_CRM_Transports (filter builder_os_crm_transports). smtp (BuilderOS’s own), brevo and ses (see “API providers” at the end of this chapter) implement the same interface.
Deliverability. CRM → Settings → Email and sender: “Sender and legal footer” (name, email, reply-to, company, postal address required and an optional DKIM selector) and “Deliverability” (the domain’s SPF, DKIM and DMARC via DNS, cached 6 h). It blocks sending: a sender from a free mailbox with strict DMARC (@gmail.com, @hotmail.com, @yahoo…), a missing postal address, subject or recipients. Filters: builder_os_crm_dns_lookup, builder_os_crm_dkim_selectors, builder_os_crm_freemail_domains.
Unsubscribes. List-Unsubscribe headers (signed https and mailto) and List-Unsubscribe-Post: List-Unsubscribe=One-Click. The link /?bos_u=<contacto>.<campaña>.<firma> opens the unsubscribe and preferences page with the site’s look, without logging in or caches; a GET doesn’t unsubscribe (scanners follow links), Gmail/Yahoo’s POST does, instantly. The unsubscribe records the optout with its evidence, enters suppression and appears in the timeline; “Resubscribe me” requires the person’s click and doesn’t apply to bounces or complaints. “Don’t measure my opens or clicks” turns on no_track.
Follow-up (on by default; turned off per site, campaign and contact). Clicks /?bos_c=<enlace>.<envío>.<firma> (302 to the destination; with a bad signature it redirects but isn’t measured; a nonexistent link gives 404), pixel /?bos_o=<envío>.<firma> and browser view /?bos_v=… (doesn’t count as an open). HMAC-SHA256 signature with the key builder_os_crm_track_key. Scanners are discarded (HEAD, known agents, bursts of different links in under 3 s, a click within 2 s of sending); opens from Apple’s proxies are marked automatic and all of them are shown as “estimated”. The IP isn’t stored. The first click per link and the first open of each email go to the contact’s timeline (email_click, email_open), like each send (email_sent). The public site only loads this code when the URL carries bos_o, bos_c, bos_u or bos_v.
Report. Sent, delivered (accepted by the server), bounces detected by SMTP (5xx: the contact goes to suppression), opens (estimated, with the automatic ones separate), clicks per link (unique people, no scanners), unsubscribes and complaints (not available with SMTP), with a chart by hour or by day.
MCP (“CRM: campaigns” group): crm_list_campaigns and crm_get_campaign_stats (read); crm_create_campaign (drafts only, content in Markdown), crm_send_campaign_test (only to the connected user) and crm_schedule_campaign (only with 10 recipients or fewer; with more it returns the panel link). “Read only” hides the three write tools.
Uninstall. Also removed: the bos_email emails (with their revisions and metadata), the options builder_os_crm_mail and builder_os_crm_track_key and the transients bos_crm_dns_*, bos_crm_cstats_* and bos_crm_test_*.