How Sending Works
When ShapedRecover sends each email, what it checks first, and what happens when sending fails.
Once a campaign is on, you don't press send. ShapedRecover works through due emails in the background, checks each one is still wanted, and retries when your mail system has a bad moment. This page explains what goes on, so you know what to expect and where to look when an email didn't go out.
The sweep: when emails go out
When a cart becomes abandoned, each matching campaign's email is scheduled for a send time: the moment of abandonment plus that campaign's delay. See Triggers & Timing.
A background job called the sweep runs every 5 minutes. Each run sends every email whose time has come, oldest first. So an email goes out on time, or up to about 5 minutes after.
- The sweep runs through Action Scheduler, the job runner built into WooCommerce. It needs your site's scheduled jobs to run; see Requirements.
- Emails go out through WordPress's own mail function, the same one your WooCommerce order emails use. Any SMTP plugin you've installed handles them too.
- Each run sends up to 50 emails within about 20 seconds. If more are due, say after a busy weekend or a site that was offline, it queues another run straight away, and keeps going until the backlog is cleared. You don't wait 5 minutes per batch.
Every email is sent at most once, even if two runs overlap.
The checks before every send
Things change between scheduling and sending. The shopper might have ordered, or you might have switched the campaign off. So right before every email, ShapedRecover checks again:
| Check | If it fails, the timeline says |
|---|---|
| The cart is still Abandoned (Recoverable). | Not sent: not abandoned |
| The shopper hasn't placed an order since the cart was captured. | Not sent: ordered |
| The address hasn't unsubscribed. | Not sent: unsubscribed |
| The campaign is still switched on. | Not sent: campaign off |
| At least one item from the cart still exists, can be bought, and is in stock. (A product made private or left without a price counts as unavailable.) | Not sent: no items in stock |
An email that fails a check is skipped for good: it won't be tried again later. You'll see it in the cart's timeline in the Cart Drawer, marked Skipped with the reason.
The one exception: if you use Restart Recovery on a lost cart, the emails skipped because it was lost are scheduled again. See Bulk Actions.
Overdue emails
Sometimes several of a cart's emails fall due at once, typically when the site has had no visitors for a while and scheduled jobs didn't run. Sending the 1-hour reminder and the 1-day reminder back to back would look odd, so:
- Only the latest one sends. The earlier ones are skipped as Not sent: overdue.
- An earlier email never arrives after a later one. If the cart has already received an email from a campaign with a longer delay, any shorter-delay email still waiting is skipped as overdue. That includes emails the cart received when it was abandoned before.
Example: the site was asleep for two days and a cart's 1-hour and 1-day emails are both overdue. The 1-day email sends; the 1-hour email is skipped.
Retries when sending fails
If your mail system refuses an email, ShapedRecover tries again:
| Attempt | When |
|---|---|
| 1st | At the scheduled time |
| 2nd | 15 minutes after the first failure |
| 3rd | 1 hour after the second failure |
| 4th | 4 hours after the third failure |
That's 4 attempts across a little over five hours. If the fourth fails too, the email is marked Failed, and the timeline shows the error your mail system gave. The checks and the overdue rule apply to every retry, so a retry never goes to a shopper who has since ordered.
A mail failure pauses sending until the next sweep
When an email fails, the run stops there. If your mail system is down, every other email would fail too and waste one of its attempts. The other due emails keep their place and their attempts, and the next sweep, 5 minutes later, tries again. Once mail works, everything that was waiting goes out.
Interrupted sends
Rarely, a run can die halfway through an email, for example if the server times out. If a send has been in progress for more than 15 minutes, it's marked Failed and not retried. ShapedRecover can't know whether that email actually left, and a missing email is better than a duplicate.
When jobs run late
WordPress normally runs scheduled jobs only when someone visits your site. On a quiet site, the sweep can fall behind. If it's more than 15 minutes overdue, every ShapedRecover tab shows this warning:
Background jobs are running late, so recovery emails and cart statuses are delayed. WordPress runs scheduled jobs when the site gets visits; a server cron job keeps them on time.
View Scheduled Actions opens WooCommerce → Status → Scheduled Actions, filtered to ShapedRecover's jobs. The notice can't be dismissed; it clears itself on the first page load after the sweep runs again. It doesn't show while tracking is off.
If you see it often, ask your host to set up a real server cron job. See Requirements.
The plain-text version
Every recovery email, and every test email, is sent as HTML plus a plain-text version of the same content, for mail apps that don't show HTML. Spam filters also look more kindly on emails that include one. In the text version:
- paragraphs, line breaks and list items become lines;
- each link's address follows its text in brackets (left out when the link text is the address itself);
- images are replaced by their alt text;
- the preheader is left out.
You don't set anything up for this. One limit: a mail plugin that bypasses WordPress's standard mailer may send the HTML version only.
Unsubscribe and suppressed addresses
Every recovery email carries an unsubscribe link, and you can't remove it. It's the small Unsubscribe block in the body, and a body without one gets the line added at the end. Emails also carry the one-click unsubscribe headers that Gmail, Yahoo and other mail apps use for their own "Unsubscribe" button.
What happens when a shopper uses it:
- The link opens a page on your site asking Stop cart reminder emails to their address, partly hidden, with an Unsubscribe button.
- Only clicking the button (or the mail app's one-click button) unsubscribes. Security scanners that open every link in an email can't unsubscribe anyone by accident.
- The page confirms: You are unsubscribed. You will get no more reminders about your cart.
From then on, the address is suppressed: every recovery email to it is skipped as Not sent: unsubscribed, for this cart and any future cart. If the address belongs to a customer account, that account's saved consent to tracking is withdrawn too. The unsubscribe link is separate from the recovery link and never restores a cart.
Unsubscribe & Privacy covers suppression and personal-data requests in full.
Tracking off pauses sending
While Abandoned Tracking is off in General Settings, no recovery emails send. Emails that fall due in the meantime wait; they aren't skipped. When you switch tracking back on, the next sweep sends them, with the overdue rule applied, so a cart that missed several emails gets only the latest.
Paused carts
You can hold one cart's emails with Pause in the Cart Drawer, or several at once with Pause Emails in Bulk Actions. Its timeline shows the scheduled emails as Paused. As with tracking, they wait rather than being skipped, and when you Resume the cart they go out under the overdue rule.
A campaign switched on while a cart is paused is still scheduled for it; the email just waits until you resume.
For developers
The batch size, the time per run and the sweep interval can each be changed with a filter. See Hooks: Actions & Filters.
Where to go next
- Set Up SMTP: reliable delivery, the biggest factor in recovery.
- Cart Drawer: see each email's status for one cart.
- Requirements: keeping background jobs on time.
- Troubleshooting: when emails don't arrive.