Run
Notifications
Email when an experiment has a winner or a problem, and a digest each week.
The studio can email you when an experiment has a verdict or a problem, when a scheduled change happens, and every Monday with a summary of the week. Open Notifications (the bell in the editor's sidebar) to choose who gets the emails and what about.
Setting up email#
The studio sends email through Resend, or through your email provider's SMTP server. For Resend, set two values in the .env file at the root of the project, then restart the studio:
RESEND_API_KEY=re_...MOCKLY_EMAIL_FROM=Mockly <alerts@example.com>MOCKLY_EMAIL_FROM is the sender, on a domain you've verified in Resend. For SMTP, set MOCKLY_SMTP_URL instead of RESEND_API_KEY:
MOCKLY_SMTP_URL=smtps://user:password@smtp.example.com:465MOCKLY_EMAIL_FROM=Mockly <alerts@example.com>MOCKLY_SMTP_URL starts with smtps:// for a secure connection from the start (usually port 465), or smtp:// for a server that upgrades to one (usually port 587), and your provider must let you send from the sender's address. When both are set, Resend is used. The same settings send account emails, such as the links that verify an address or reset a password.
Until the sender and a way to send are set, nothing is sent. Emails are kept in Notifications instead, marked Not sent, so you can see what the studio would have sent. It says when email isn't set up.
Links in emails point at the studio's address: set MOCKLY_PUBLIC_URL to where your team reaches it, such as https://studio.example.com. It defaults to http://localhost:3000.
Who gets emails#
Under Recipients, type an address and press Enter, up to 10. Each is saved as it goes on the list, and ✕ takes one off. Everyone on the list gets the same emails. Send a test email checks that your email server accepts mail from the studio.
What you're emailed about#
| Setting | When |
|---|---|
| A variant wins or converts worse | As soon as an experiment's verdict says a variant converts better or worse than control. Once per run: restarting the results, or a publish that starts a new revision, can send it again. |
| An experiment has a problem | When visitors split differently from the weights, more than chance explains, so the results are held back, or when a variant hurts a guardrail. The email says whether the experiment paused itself. See Reading results. |
| A scheduled change happens | When a scheduled change runs, is skipped, or fails. |
| Weekly digest | Mondays at 9:00 in the time zone you choose: the last 7 days' visitors, page views, and conversions, each experiment's state, the runs that finished, and the changes scheduled for the coming week. A site with no visits, experiments, or finished runs gets none that week. |
All four start on, and each switch saves as you turn it on or off, as the time zone does when you choose it. Each running experiment's verdict is checked about once an hour (every 15 minutes with guardrails), so a winner email can arrive up to an hour after the verdict changes. A verdict emailed once isn't emailed again for the same run, however often it's checked. The intervals behind verdicts stay valid however often they're checked, so acting on the email is as safe as acting on the Analytics page.
The time zone also sets the times written in emails. The digest goes out from 9:00 on Monday until 9:00 on Tuesday, whenever the studio is running in that window.
Form submissions aren't on this list: each person who wants a form's submissions by email turns it on for themselves, on the form's page, and gets them at their own account's address. See Forms. They go out through the same email server, with the times in the time zone above.
Delivery#
The studio sends email in the background, about once a minute. When your email server fails, it tries again after 1 minute, 5 minutes, 30 minutes, 2 hours, and 12 hours, then gives up and marks the email Failed.
Recent emails in Notifications lists the latest 50, with what each was about, who it went to, and whether it was Sent, is Sending or Retrying, Failed (with the server's answer), or Not sent. Failed and unsent emails have Send again. Emails are kept for 90 days.
Emails are sent while the studio is running. One that's due while it's stopped goes out when it starts again.