All 17 Email Delivery sections
Copies of your site
After a real move to a new address, your site's email waits until somebody confirms the move. Every message is held, not sent, until an administrator presses This is the real site now: send held mail, on the notice every wp-admin screen shows or on the Dashboard. The held messages are then sent, oldest first. Nothing is lost in between.
That wait is the price of what this protects against. A staging or local copy of a site keeps the live site's mail settings, password and all, and without this it sends real order confirmations, password resets and renewal reminders to real customers. Email Delivery remembers the address the site was set up at and holds every message when:
- the site answers at another address: another domain, a subdomain such as
staging.shop.example, another folder or another port. Changing between http and https, or adding or removingwww., is not a move; - or WordPress says it is a staging, development or local site (
WP_ENVIRONMENT_TYPE, which many hosts set on their staging copies).
Most copies are made by copying the database and then replacing the live domain with the copy's everywhere in it (wp search-replace, or a migration plugin doing the same). That replaces the address Email Delivery noted too, so it also keeps the address a second time, written in a form a search and replace of the domain cannot change, and goes by that one. A copy made that way is held, and the notice names the address the site was really set up at.
A site updated to this version notes the address it is at the first time its wp-admin is opened or it sends a message. A copy made before that update, and updated first, notes its own address, so it is held only if WordPress calls it staging, development or local. A site that already ran 1.6.0 keeps the address it noted then and has the second copy of it added the same way, so a copy made from it before this update is caught only if its address was not replaced.
A copy made without the plugin's log table gets the table made again the first time it holds a message, or opens its wp-admin, since a held message is kept nowhere else. Where the database does not let the plugin make it, a message would have nowhere to be kept, so it is sent as usual instead of being lost, and the notice and the Dashboard say how many went that way.
A held message:
- is not sent to anybody, and
wp_mail()is told it did not go, which is true: a password reset asked for on a copy says the email could not be sent; - is kept in the log under Held, with its body and attachments, whether or not the log keeps everything else, and says why it was held;
- is not tried again and is not reported as a failure;
- is deleted with the rest of the log after the days set under Settings → The log, though not to make room under the number of messages kept.
The two answers:
- This is the real site now: send held mail notes this address as the real site (and, where a host marks a live site as staging by mistake, that this is the real site anyway), then sends what was held, oldest first, a few at a time, as a retry is sent: one the mail server refuses goes into the retry queue like any other.
- Keep holding says this is a copy. Email stays held and the notice stops appearing; the Dashboard still says email is being held. A copy of the copy, at yet another address, asks again.
While email is held, the only messages that go are the ones you send yourself from Email Delivery: the test on Send a test, and a message you send again from the log or from an order's Emails about this order box, where you choose the message and see whom it is for. Nothing else goes, the retry queue included.
To switch this off, choose Settings → On a copy of this site → Send as usual: every message is then sent wherever the site runs. A developer who wants a local copy to send real email can choose that.
When alerts go to Slack, Discord or a web address, one alert is posted the first time a copy holds a message, naming the two addresses and nothing from the message. wp email-delivery hold says whether email is held and why, wp email-delivery hold release is This is the real site now (and sends the held messages there and then) and wp email-delivery hold keep is Keep holding. On a network, each site is judged by its own address.
Still stuck? Ask the developers who wrote it. We aim to reply within one business day.