E-mail templates & alerts
ShopClass sends e-mail at almost every meaningful moment: account activation, listing validation, password resets, contact-form messages, comment notifications and saved-search alerts. All of them are editable.
Settings → Email templates.
Editing a template
Section titled “Editing a template”Click a template to open it. Two fields, per language:
- Subject: the e-mail’s subject line.
- Message: the e-mail’s body.
Core and installed plugins each register their own templates, so a plugin that sends mail adds its own to this list.
Language tabs
Section titled “Language tabs”Each field has a tab per active language. The tab for your own admin language opens first and is marked with a dot, so you always land where you can read what you write.
Placeholders
Section titled “Placeholders”The Placeholders panel on the right lists the values ShopClass fills in when it sends the e-mail: the user’s name, the listing title, the confirmation link. It is split in two:
- In this email: placeholders only this template uses.
- In every email: placeholders available on every template.
Click a placeholder to insert it at the cursor, in whichever field (Subject or Message) you were last typing in.
Keep the placeholders. A template missing its link placeholder sends an activation e-mail nobody can act on, and the send still looks successful.
Sending a test
Section titled “Sending a test”The Send a test panel sends the subject and message exactly as they are on screen, placeholders are not filled in. The address is prefilled with your own admin e-mail; change it, then click Send test email.
Use it after editing, especially on the activation and password-reset templates: those two are the ones that lock people out when they are wrong.
Internal name
Section titled “Internal name”The Template panel shows the template’s internal name, read-only. This is how core finds the template, so it cannot be changed.
The templates that matter most
Section titled “The templates that matter most”| Template | Why it matters |
|---|---|
| Account activation | A user who never gets this cannot register. |
| Listing validation | A seller who never gets this has an invisible listing. |
| Password reset | The only self-service route back in. |
| Contact publisher | The message that makes the marketplace work at all. |
| Alerts | Saved-search notifications: the thing that brings users back. |
Notifications to you
Section titled “Notifications to you”Several settings decide when the admin gets mail:
- Listings → Settings → notify admin when a new listing is added
- Users → Settings → when a new user is registered
- Settings → Comments → Notifications: when a comment is posted, and when one is held for moderation
All of these are useful in week one and unbearable at volume. Turn them off when the site is busy and moderate from the admin lists instead.
Order e-mails
Section titled “Order e-mails”A shop sends the buyer six mails. Each goes once per order, and a failed send is tried again later.
- Order received: a bank transfer or cash on delivery order was placed. You get a new-order mail too.
- Order confirmation and receipt: the order was paid. Turn it off with the Receipt e-mail setting under Billing.
- Shipped: you marked it shipped, with the carrier and tracking link.
- Delivered: with a “Rate it” link for each product.
- Cancelled: an unpaid order was cancelled.
- Refunded: the amount and how long it takes to show up.
New-message e-mail
Section titled “New-message e-mail”When on-site messaging is on, a user gets one mail a minute at most per conversation, saying they have a new message about a listing. It holds a link to the conversation page and none of the message text.
A user with the conversation open sees new messages live, or within 15 seconds.
Browser notifications
Section titled “Browser notifications”A user can get a notification on their phone or computer when a new message comes in, even with the site closed.
- Switch. Users → Settings → Send browser notifications for new messages. Off by default, and it needs on-site messaging and an HTTPS site (
localhostalso works). - Per browser. Each user turns it on from their messages page with Notify me on this device, and off again with Stop notifying this device. The browser asks for permission first.
- No text leaves your site. The push service (Google, Apple or Mozilla) gets an empty wake-up. The browser then asks your site how many messages are unread and shows “3 new messages”. Clicking it opens the inbox.
- Timing. Wake-ups wait 15 seconds so a burst of messages gives one notification. On the Docker image the worker sends it within seconds. On shared hosting it goes out with the next cron run, or the next site visit that runs the queue, so it can take minutes.
A browser is forgotten 90 days after the user last opened their messages page in it. System info → Server shows a “Web push” row and warns if the site is not on HTTPS or the push service cannot be reached.
Alerts and cron
Section titled “Alerts and cron”Saved-search alerts are not sent when a listing is published. They are sent by cron, once a day, or once a week for alerts set to weekly.
That means the single most common report, “my users never get alerts”, is almost always a missing crontab entry, not a mail problem. Check it first:
php oc-cli.php doctor # reports cron freshnessSee setting up cron.
Alerts themselves are managed at Users → Alerts, where you can see, enable, disable and delete users’ saved searches.
When e-mail does not arrive
Section titled “When e-mail does not arrive”Work through it in this order:
- Is it a cron e-mail? Alerts and anything scheduled need cron running.
- Is SMTP configured? PHP’s default
mail()usually lands in spam: see mail server. - Is the domain authenticated? SPF, DKIM and DMARC for the sending address.
- Is the template intact? A broken template can produce mail that arrives but is useless.
- Check the spam folder before concluding nothing was sent.