Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
91d5064
feat(connect): one button instead of copying an API key (1.8.3)
sendbeam-bot Sep 23, 2026
e042c18
Dress the Connect panel in the plugin's own components
sendbeam-bot Sep 23, 2026
ffebade
Set up the sending domain, and make Disconnect findable
sendbeam-bot Sep 23, 2026
1914443
Cover Connect v2, and the Overview screen itself
sendbeam-bot Sep 23, 2026
3e7bc9f
Document what connecting now does for you
sendbeam-bot Sep 23, 2026
cb4c787
Never revoke a key this site did not issue
sendbeam-bot Sep 23, 2026
270cb45
Say why the sending domain could not be set up
sendbeam-bot Sep 23, 2026
b7d181a
Say which DNS records are live, one row at a time
sendbeam-bot Sep 24, 2026
90479d2
Say when the domain was last checked in the site's own words
sendbeam-bot Sep 24, 2026
6574c3d
Say why there is no sending domain, in SendBeam's own words
sendbeam-bot Sep 24, 2026
b44197e
Offer a way back into consent that is not "disconnect first"
sendbeam-bot Sep 24, 2026
a55c3d1
Put back what Connect filled in, and nothing else
sendbeam-bot Sep 24, 2026
0ef4e10
Check the DNS again on the site's own, for a day
sendbeam-bot Sep 24, 2026
9a82678
Look everywhere a form actually ends up, and believe the owner
sendbeam-bot Sep 24, 2026
32ce342
Never make wp-admin wait ten seconds for a panel
sendbeam-bot Sep 24, 2026
d9128bc
Do not offer to store a key wp-config.php will overrule
sendbeam-bot Sep 24, 2026
fee1fb1
Come back to WordPress when the registrar has finished
sendbeam-bot Sep 24, 2026
852299d
Say what changed, in the words a site owner would use
sendbeam-bot Sep 24, 2026
a792100
Prove the sender address Connect set up lands in an empty From field
sendbeam-bot Sep 24, 2026
f504feb
Do not act on an answer SendBeam did not just give
sendbeam-bot Sep 24, 2026
c4bbc0a
Do not offer to paste a key wp-config.php would overrule
sendbeam-bot Sep 24, 2026
608e3b3
Let go of the old workspace before joining a new one
sendbeam-bot Sep 24, 2026
ab76372
Offer the way out on the step somebody is standing on
sendbeam-bot Sep 24, 2026
89a15a4
Say how to change the domain, not only how to finish it
sendbeam-bot Sep 24, 2026
3408557
Believe the owner about a form this site cannot see
sendbeam-bot Sep 24, 2026
d929d9c
Say the check has run, because it has
sendbeam-bot Sep 24, 2026
3cc15d1
Point step one at the button, not at the fallback under it
sendbeam-bot Sep 24, 2026
84588a5
Give the two new block comments the blank line the standard wants
sendbeam-bot Sep 24, 2026
246e2d5
Line up the assignments the new setting lengthened
sendbeam-bot Sep 24, 2026
326b51d
Give SendBeam its own menu, so its sections can be found
sendbeam-bot Sep 24, 2026
6e086d6
Let the lists be lists, so they search, page and fit a phone
sendbeam-bot Sep 24, 2026
d95707e
Walk a new site through setup once, and let it walk away
sendbeam-bot Sep 24, 2026
1b9e600
Say what is actually happening, where somebody is looking
sendbeam-bot Sep 24, 2026
ec7c0c1
Stop the plugin shouting, and let the site choose the button colour
sendbeam-bot Sep 24, 2026
9ff61b7
Put the connection where somebody arriving is looking, and fix what a…
sendbeam-bot Sep 24, 2026
f4281d6
Describe what changed, in the words somebody would search for
sendbeam-bot Sep 24, 2026
b4ba72e
Give the workspace card something to say, and stop stretching it
sendbeam-bot Sep 24, 2026
7b13b32
Stop the Overview telling the truth twice and getting it wrong
sendbeam-bot Sep 24, 2026
e3f859b
Make the records readable on a phone, and the test email honest
sendbeam-bot Sep 24, 2026
5b8e6c1
Stop the plugin arguing with itself about whether it is connected
sendbeam-bot Sep 24, 2026
8896439
Send "Open SendBeam" to SendBeam, not to the page selling it
sendbeam-bot Sep 24, 2026
7e908db
Stop the Overview flashing a red box it was about to hide
sendbeam-bot Sep 24, 2026
cb919ef
Make a pop-up rule look like every other card in the plugin
sendbeam-bot Sep 24, 2026
8472f9a
Give the email log a table, so a busy site still has one
sendbeam-bot Sep 24, 2026
f8fc3e1
Let Disconnect actually disconnect
sendbeam-bot Sep 24, 2026
f88a0f4
Stop calling a customer's own domain SendBeam's shared address
sendbeam-bot Sep 24, 2026
afee50b
Stop the Forms screen's two cards from wiping each other
sendbeam-bot Sep 24, 2026
1333e24
Stop raising a critical alarm about email that is not being sent
sendbeam-bot Sep 24, 2026
ef8bdac
Make the test email describe the message that arrived
sendbeam-bot Sep 24, 2026
d3b7e11
Print the reason SendBeam gave for having no sending domain
sendbeam-bot Sep 24, 2026
71fb766
Stop the setup guide ticking steps that have not been done
sendbeam-bot Sep 24, 2026
bb3482d
Stop reporting a pop-up as live when every rule is switched off
sendbeam-bot Sep 24, 2026
22f31b9
Give a contact row a shortcode that places that contact form
sendbeam-bot Sep 24, 2026
5505f94
Stop the support block claiming a key was pasted when there is none
sendbeam-bot Sep 24, 2026
5f9e021
Stop telling a disconnected site to fix its key's permissions
sendbeam-bot Sep 24, 2026
745c6d0
Revoke a Connect key removed on the Advanced tab
sendbeam-bot Sep 24, 2026
49d697a
Offer a reconnecting site the domain it already sends from
sendbeam-bot Sep 24, 2026
cffc405
Stop clipping the longest DNS host on a desktop screen
sendbeam-bot Sep 24, 2026
e9fec60
Tell somebody the result of Check now where they pressed it
sendbeam-bot Sep 24, 2026
01e9eb5
Say as much on the sending domain screen as on the checklist
sendbeam-bot Sep 24, 2026
3da0d51
Answer a permission refusal with 403 rather than 500
sendbeam-bot Sep 24, 2026
df85228
Make the phone tap targets big enough to hit
sendbeam-bot Sep 24, 2026
b5eef04
Say "Not active" about a plugin that may well be installed
sendbeam-bot Sep 24, 2026
7ec5b6f
Name the sending domain the site has, not the one it asked about
sendbeam-bot Sep 24, 2026
caec0ed
Make the hidden rows actually hidden, and the small buttons hittable
sendbeam-bot Sep 24, 2026
0fa1a9c
Add the support account to Contributors
sendbeam-bot Sep 24, 2026
8d9a15f
Re-take the listing screenshots from the 1.8.3 build
sendbeam-bot Sep 24, 2026
4afe1d7
Show a card in the editor instead of a form that cannot load
sendbeam-bot Sep 24, 2026
1676fe0
Trim two screenshot captions to what the frames show
sendbeam-bot Sep 24, 2026
50e31c8
Make the WooCommerce claims true on the checkout WooCommerce installs
sendbeam-bot Sep 24, 2026
db3a05c
Show the DNS records on the Overview, not a 2px sliver
sendbeam-bot Sep 24, 2026
c7d0a55
Send step 2 to the plugin's own Sending domain screen
sendbeam-bot Sep 24, 2026
dbdca5f
Give the WooCommerce changes the comments the standard asks for
sendbeam-bot Sep 24, 2026
04a420f
Finish the comments the standard asks for on the pop-up and event hooks
sendbeam-bot Sep 24, 2026
c20fc13
Note the last two Overview fixes in the changelog
sendbeam-bot Sep 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .wordpress-org/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ inside them. `.distignore` keeps this folder out of the distributed zip.
| `icon.svg` | The same mark as vector, preferred where it is supported |
| `banner-772x250.png` | The header of the listing page |
| `banner-1544x500.png` | The same, on high-density screens |
| `screenshot-1.png` … `screenshot-7.png` | The Screenshots section, captioned in order by `readme.txt` |
| `screenshot-1.png` … `screenshot-9.png` | The Screenshots section, captioned in order by `readme.txt` |

Captions come from the `== Screenshots ==` list in `readme.txt`: the *n*th line
captions `screenshot-n.png`. Adding a screenshot means adding both.

Screenshots are 1280px wide, taken on a real site running the plugin against a
live SendBeam workspace.
Screenshots are 1280x800 at 1x, taken on a real site running the plugin
against a live SendBeam workspace. Nothing in them is seeded, mocked or
blurred: the only editing is that other plugins' admin notices are hidden, so
each one shows this plugin rather than somebody else's nag.
Binary file modified .wordpress-org/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .wordpress-org/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .wordpress-org/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .wordpress-org/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .wordpress-org/screenshot-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .wordpress-org/screenshot-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .wordpress-org/screenshot-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 128 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

109 changes: 98 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# SendBeam for WordPress

Your [SendBeam](https://sendbeam.io) forms on a WordPress site, plus pop-ups, opt-ins at registration and
checkout, and the site's own email from your verified domain. A block, four shortcodes and one settings page.
checkout, and the site's own email from your verified domain. A block, four shortcodes and its own admin menu.

Full documentation: **[sendbeam.io/docs/wordpress](https://sendbeam.io/docs/wordpress)**

| To do this | Use |
| --- | --- |
| A signup form in a post, page or template | `SendBeam Form` block, or `[sendbeam_form id="…"]` |
| A contact form | `[sendbeam_contact]` |
| A pop-up | Settings → SendBeam → Pop-ups |
| A contact form | `[sendbeam_contact]`, or `[sendbeam_contact id="…"]` for a particular one |
| A pop-up | SendBeam → Pop-ups |
| Your own button that opens a pop-up | `[sendbeam_popup_button label="Subscribe"]`, or any element with `data-sendbeam-open="<form id>"` |
| Ask people to subscribe while they register, comment or check out | Settings → SendBeam → Audience |
| Send WordPress email from your verified domain | Settings → SendBeam → Site email |
| Ask people to subscribe while they register, comment or check out | SendBeam → Audience |
| Send WordPress email from your verified domain | SendBeam → Site email |
| See what the site has sent, and what became of it | SendBeam → Site email → Email log |
| Find out why something is not working | SendBeam → Help, or Tools → Site Health |

Forms render from their hosted page, so a change in SendBeam (fields, double opt-in, thank-you text, the list
people join) shows on the site at once and the theme's CSS never fights the form's — while still taking the
Expand All @@ -30,8 +32,47 @@ git clone https://github.com/sendbeam-io/sendbeam-wordpress
cd sendbeam-wordpress && bin/build-zip.sh # → build/sendbeam.zip
```

Then Settings → SendBeam and paste an API key. Forms are picked from a dropdown of the connected workspace's
own forms — no IDs to copy.
Activating it takes you once to **SendBeam → Set up**: connect, verify your sending domain, switch on site
email, place a form. Every step can be skipped, the whole thing can be left from any step, and where you got
to is remembered. It never appears when several plugins are activated at once, never on a site that already
has a key, and `add_filter( 'sendbeam_setup_wizard', '__return_false' )` switches it off for good.

The first step is **Connect SendBeam**. The button opens a window on sendbeam.io where you
create your account or sign in — the site's name and your administrator email address are already filled in —
and tick what this site may do: show your forms, add people who opt in, send the site's own email, send
WooCommerce events, set up this site's sending domain. Approve, and this site is handed an API key with
exactly those permissions. The key never passes through the browser: the window comes back with a single-use
grant bound to this site's address and to the `state` this site minted, and your server swaps it for the key
in one call. Nothing is sent to SendBeam until you press the button. If you already have a key, "I already
have an API key" on the same screen still takes one. Forms are then picked from a dropdown of the connected
workspace's own forms — no IDs to copy.

### Where things are

SendBeam has a top-level menu with one page per section rather than tabs nothing in the menu mentions:
**Overview** (what this site is connected to, how far through set-up it is, what the workspace holds),
**Forms**, **Pop-ups**, **Audience**, **Site email**, **E-commerce**, **Settings** (Connection · Sending
domain · Advanced) and **Help**. The old `options-general.php?page=sendbeam` addresses and every one of their
tabs 301 to whatever replaced them.

Forms, lists and the email log are `WP_List_Table` subclasses, so they search, offer a rows-per-screen setting
under Screen Options, collapse the way core's screens do on a phone, and — for the log — delete in bulk.

Leaving the sending-domain box ticked does the next piece of setting up for you. The consent page suggests
this site's own domain and lets you type a different one — a brand domain, or `mail.` something — and whatever
you enter is what SendBeam sets up and what the plugin shows. The Overview's second step lists its DNS records
with a Copy button on every value and a column saying which of them are live yet, a **Check now** button that
re-runs the check without leaving wp-admin, and a **Set up DNS automatically** button where your registrar
supports one-click set-up — that one brings you back here when it is done. Records rarely spread while you are
still looking at wp-admin, so the site quietly checks again every hour for a day and finishes the job when
they appear.

Site email fills in its sender from the workspace but only switches on once that domain is verified — a site
should never have its password resets quietly routed through a domain nothing has set up yet. If a permission
turns out to be missing, the step that needs it offers **Reconnect with more permissions** rather than making
you disconnect first. **Disconnect**, on the connected card, revokes the key in SendBeam, forgets it here, and
puts back the settings Connect filled in — your list, form, sending domain and sender stay in the workspace,
where other sites may still be using them.

## API key permissions

Expand All @@ -40,11 +81,57 @@ Only what you use. Placing a form or a pop-up needs no key at all.
| Permission | Needed for |
| --- | --- |
| `forms:read` | Listing your forms in the settings page and the block |
| `lists:read` | The Audience tab and its subscriber counts |
| `lists:read` | The Audience screen and its subscriber counts |
| `contacts:read`, `contacts:write`, `lists:write` | The opt-in box at registration, comments or checkout |
| `transactional:send` | Site email |

Paste the key in the settings, or define `SENDBEAM_API_KEY` in `wp-config.php` to keep it out of the database.
| `domains:read` | The sending-domain step: its DNS records, and **Check now** |

Paste the key under **SendBeam → Settings → Advanced**, or define `SENDBEAM_API_KEY` in `wp-config.php` to
keep it out of the database. With the constant set the plugin offers neither the button nor the paste field,
because either would store a second key nothing would ever use.

### The email log

`{$wpdb->prefix}sendbeam_mail_log`, one row per message: `sent_at` (UTC), `to_addr`, `subject`, `result`
(`sent` / `fallback` / `failed`), `note`, `source`, with indexes on `sent_at` and `result`. Created by dbDelta
on activation and behind a `sendbeam_db_version` check on `admin_init`, so an upgrade by zip — which fires no
activation hook — still gets it. Per-site on multisite. **Bodies are never stored.**

Retention is 7 / 30 / 90 days or for ever, pruned by a daily `sendbeam_mail_log_prune` event, with a hard cap
of `SENDBEAM_MAIL_LOG_MAX` (20,000) rows on top of whatever the setting says. Entries from the pre-1.8.3
option migrate on first load and the option is deleted; uninstall drops the table.

### What the site sends as

Two settings, easy to confuse and once easy for the plugin to contradict itself about. **Verifying a domain**
proves the domain is yours. **The From address** decides which address a message actually goes out as, and it
starts as SendBeam's shared `ws-…@post.sendbeam.io`. `sendbeam_effective_sender()` is the one place that works
out the address the next message would use and classifies it — `own_domain`, `shared`, `other` or `none` — and
the Overview's connection line, the site-email step and Site Health all read it. `own_domain` is settled first
and wins outright; `shared` is an exact match on `post.<app host>` or `mail.<app host>` and never "anywhere
under the app's domain", so a customer whose own domain is a subdomain of SendBeam's is not told it is
SendBeam's. Where the domain is verified
and the address is still the shared one, the step says so and offers one press to move it.

**SendBeam → Help → Run the setup guide again** puts the current user back at step 1 of the wizard without
touching `sendbeam_setup_done`, which is the site's own answer to whether anybody has set it up.

## Diagnosing a site

**SendBeam → Site email → Send a test email** sends a real, designed message built from the same
`sendbeam_effective_sender()` answer the Overview uses: the headline says which address it came from, a
**Signed by** row names the domain that authenticated it, and the sending-domain row distinguishes "verified
and in use" from "verified, but not in use yet". Where something is left to do it carries a **Next step**
block with the button that does it, and the in-page result mirrors that with an amber note.
The result replaces the form in the page: a success card, or a failure card saying what went wrong, what it
means, what to do about it, and a **Details for support** block captured at the moment of failure — versions,
where the key is kept (never the key), the domain state, the HTTP status and the raw error — that copies in
one press.

**Tools → Site Health** carries three checks: `sendbeam-key` (the key works), `sendbeam-domain` (the sending
domain is verified) and `sendbeam-mail` (site email is not switched on behind an unverified domain — critical
when it is). Site Health → Info has a SendBeam section with every state this site holds, and **SendBeam →
Help** shows the same values with a **Copy for support** button.

## Shortcodes

Expand All @@ -59,7 +146,7 @@ Paste the key in the settings, or define `SENDBEAM_API_KEY` in `wp-config.php` t

## Appearance

Settings → SendBeam → Forms → Appearance hands the hosted form your own button colour, text colour, field
SendBeam → Forms → Appearance hands the hosted form your own button colour, text colour, field
background, field border, corner radius, text size and typeface (including *match my theme*). Values are
validated before use — a colour must be hex, sizes are clamped, and the typeface is named from a list rather
than supplied as a font stack. The same appearance is carried into pop-ups.
Expand Down
2 changes: 1 addition & 1 deletion blocks/form/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "sendbeam/form",
"version": "1.8.2",
"version": "1.8.3",
"title": "SendBeam Form",
"category": "widgets",
"icon": "email-alt",
Expand Down
7 changes: 5 additions & 2 deletions blocks/form/index.asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

return array(
'dependencies' => array( 'wp-blocks', 'wp-element', 'wp-block-editor', 'wp-components', 'wp-i18n', 'wp-server-side-render', 'wp-api-fetch' ),
'version' => '1.8.2',
// wp-server-side-render is gone with the live preview it was for: the
// editor renders a placeholder card now. Loading a script nothing uses is
// how an editor gets slow one dependency at a time.
'dependencies' => array( 'wp-blocks', 'wp-element', 'wp-block-editor', 'wp-components', 'wp-i18n', 'wp-api-fetch' ),
'version' => '1.8.3',
);
68 changes: 66 additions & 2 deletions blocks/form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
var RangeControl = wp.components.RangeControl;
var Placeholder = wp.components.Placeholder;
var ExternalLink = wp.components.ExternalLink;
var ServerSideRender = wp.serverSideRender;
var __ = wp.i18n.__;
var sprintf = wp.i18n.sprintf;
var useState = wp.element.useState;
var useEffect = wp.element.useEffect;
var apiFetch = wp.apiFetch;
Expand Down Expand Up @@ -69,9 +69,73 @@
__nextHasNoMarginBottom: true,
} );
}
/**
* The three-square mark, as three divs. No image request, and it
* survives an editor that has not loaded the plugin's admin CSS.
*/
function mark() {
return el( 'div', { style: { display: 'flex', gap: '5px' }, 'aria-hidden': 'true' },
[ '#E2442A', '#1F3FBF', '#3B7D46' ].map( function ( colour, i ) {
return el( 'div', { key: i, style: { width: '12px', height: '12px', background: colour } } );
} )
);
}

/** What this block is pointing at, in words. */
function chosen() {
var match = ( forms || [] ).filter( function ( f ) { return f.id === effectiveId; } )[ 0 ];
if ( ! match ) {
return null;
}
return 'contact' === match.kind
/* translators: %s: the form's name */
? sprintf( __( '%s — contact form', 'sendbeam' ), match.name )
/* translators: %s: the form's name */
: sprintf( __( '%s — signup form', 'sendbeam' ), match.name );
}

var body;
if ( UUID.test( effectiveId ) ) {
body = el( ServerSideRender, { block: 'sendbeam/form', attributes: a } );
/*
* A placeholder card, not the form itself.
*
* The form is a cross-origin iframe, and SendBeam only serves
* it to the sites its owner has listed — which it decides from
* the referrer. The block editor renders inside a nested
* iframe with an opaque origin, so there is no referrer to
* send and the hosted page answers "This form can only be
* shown on the sites its owner has listed" on a site that is
* listed. Loosening that check for a missing referrer would
* let anybody embed the form with referrerpolicy=no-referrer,
* so the editor stops asking: it says what will be on the page
* and offers to open the real thing in a tab, where there is a
* referrer. The published page is unchanged.
*/
var name = chosen();
body = el( 'div', {
style: {
border: '1px solid #1e1e1e',
background: '#fff',
padding: '20px 22px',
display: 'flex',
flexDirection: 'column',
gap: '10px',
},
},
el( 'div', { style: { display: 'flex', alignItems: 'center', gap: '10px' } },
mark(),
el( 'strong', { style: { fontSize: '14px' } }, __( 'SendBeam form', 'sendbeam' ) )
),
el( 'div', { style: { fontSize: '14px', color: '#1e1e1e' } },
name || ( a.formId ? a.formId : __( 'Your default form', 'sendbeam' ) )
),
el( 'div', { style: { fontSize: '13px', color: '#646970' } },
__( 'The form appears here on the published page.', 'sendbeam' )
),
config.previewBase
? el( ExternalLink, { href: config.previewBase + effectiveId }, __( 'Preview', 'sendbeam' ) )
: null
);
} else {
body = el( Placeholder, {
icon: 'email-alt',
Expand Down
Loading
Loading