Skip to content
CWPControl Web PanelDocumentation

E-mail and mass mail

Updated

The billing sends e-mails for orders, invoices, services, tickets and security events, in the client’s language. You can edit every text. Mass e-mails to chosen clients are sent slowly in the background, with a one-click unsubscribe link.

Where to find it:

  • General settings → Outgoing e-mail (SMTP);
  • E-mail templates;
  • Mass e-mail.
E-mail templates
Mass e-mail

Outgoing e-mail (SMTP)

FieldMeaning
SMTP hostEmpty = PHP mail()
Port, encryption587 with TLS (STARTTLS), 465 with SSL, or none
Username, passwordThe password is stored encrypted.

Click Send a test e-mail to me after saving.

Senders:

  • ticket e-mails are sent from the department’s address;
  • invoice e-mails from Invoice e-mails sent from in Billing settings;
  • everything else from mail.from in config.php, or from the brand’s sender.

Deliverability: publish SPF, DKIM and DMARC for the sending domain, otherwise Gmail and others may reject or junk the mails.

A separate SMTP server for mass e-mails

Under Settings → General → SMTP for mass mails you can send mass e-mails (newsletters) through their own SMTP server, for example a bulk mail service. Ticket, invoice and password e-mails keep the normal route. A newsletter to an old list can then never put your own server’s IP on a block list. Empty = mass e-mails use the normal route too.

For a test installation, set 'mail' => ['mode' => 'log'] in config.php. E-mails are then only written to storage/mail/ and never sent.

E-mail templates

E-mail templates lists all templates:

  • Client account: sign-up, e-mail verification, password reset and change, user invitation, security notice.
  • Orders and services: order confirmation, welcome, service expires soon, suspended, unsuspended, terminated, cancellation confirmation.
  • Invoices: invoice created, paid, reminder, payment failed, refunded.
  • Tickets: opened, reply, closed.
  • Domains: registered, transfer started.
  • Staff notifications: new order, new ticket, ticket reply, cancellation.
  • Cart reminder.

Each template exists in every language. Open one to change the Subject and the Text (plain text). The Placeholders list shows what you can use, for example {client_first_name}, {invoice_number}, {service_details} and {signature}. The Preview shows the result. Restore default brings the original text back.

Signature: the {signature} placeholder, set at the top of the templates page, for example “Best regards, {company_name}”.

The E-mail log (on the client, and in the client area for the client) keeps a copy of every e-mail sent.

Mass e-mail

  1. Recipients: filter by products, servers, service status, client status and country. Click Count recipients to see how many clients match.
  2. Message:
    • the sender address (empty = the default sender), the subject and a plain-text message;
    • placeholders such as {client_first_name}, {client_name} and {company_name};
    • Important service notice: the mail also goes to clients who switched general e-mails off. Use it only for real service notices.
  3. Sending:
    • E-mails per minute: keep it low for large lists, for example 10–30 per minute, so Gmail and Yahoo don’t throttle you;
    • Check the addresses before sending: skips addresses without a valid domain (no MX or A record).
  4. Send. The mail is queued and the massmail:send cron (every minute) delivers it at that rate, so a large list can run for hours.

The Sent list shows the progress. Addresses that failed are listed under problems. Every mass e-mail has List-Unsubscribe headers (RFC 8058 one-click) and an unsubscribe link at the bottom. A client who unsubscribes gets no further general e-mails, but still gets invoices, service and ticket e-mails.

Imported contacts (addresses that are not clients)

Addresses of people who are not clients, for example the administrators of servers that run your software, can be imported from a file (one address per line, email or email,name):

php bin/console massmail:import admins.csv --list=server-admins

The import skips invalid addresses and server defaults that never reach a person (root@localhost, domains without a dot, .local, .localdomain, example.com, an IP address as domain) and addresses that belong to a client. Importing the same file again adds only the new addresses.

Once a list exists, the mass e-mail form shows Send to (clients, imported contacts or both) and Contact list. An address that belongs to a client always gets the client e-mail, never the contact e-mail. Contacts have their own unsubscribe link and are marked as bouncing like clients, so later mass e-mails skip them. Send large contact lists slowly and with Check the addresses on.

SMS notices

Settings → SMS: choose Twilio, Vonage or another HTTPS SMS gateway and enter its credentials and the sender. For another gateway, enter its URL with the placeholders {to}, {to_digits}, {message}, {from}, {user} and {secret}; POST sends the part after ? as the form body.

Client notices (each can be switched on and its text changed): new invoice, invoice overdue (first notice), card payment failed, service suspended, staff replied to a ticket. They go only to clients who switched SMS on in their profile (or whom staff switched on under Edit) and whose phone number starts with the country code (+385 … or 00385 …).

Staff notices go to the staff numbers in the settings: new high priority ticket, new order.

Send a test SMS checks the settings. The page lists the last messages with their result. SMS per day at most (default 100) stops sending for the rest of the day when reached. Texts never contain passwords.

Addresses that bounce

Mark clients whose e-mails bounce, so mass e-mails skip them: pass the bounce list of your mail server to php bin/console clients:mark-bounced < list (one address;…;reason per line; --dry shows what it would mark). The client page shows E-mails to … bounce and the client sees a notice in the client area asking for a new address. The mark is removed when the address changes, or with The address works again on the client page.

A mass e-mail marks addresses by itself: one that fails the address check, or one the mail server refuses, is marked as bouncing and left out of the next mass e-mails. When more than 5% of a mass e-mail fail (over 20 addresses), the cause is more likely your own mail server or DNS, so nobody is marked.

Delivery watch (block lists)

When a mass e-mail goes to an old list, the IP of your mail server can end up on a block list such as Spamhaus. Microsoft, Apple and every server that uses the list then refuse all your mail, including ticket replies and invoices. The billing watches for this every few minutes (Settings → General → Delivery watch):

  • Block list check. Enter the public IP of your mail server under Sending IPs to check. It is looked up in Spamhaus ZEN, Barracuda and SpamCop.
  • Refusals. A bounce that says the refusal is because of a block list (blocked using Spamhaus, listed on, S3150 …) is recorded as blocked. The recipient’s address is fine, so it is not marked as bouncing.
  • When the IP is listed, or after 10 such refusals within an hour, the billing opens one alert ticket in the Alerts department and sends a Telegram message (when Telegram is set up). It also pauses running mass e-mails, because sending on keeps the IP on the list. The dashboard shows a red notice. Resume the mass e-mail yourself once the cause is fixed.
  • Refused ticket and invoice e-mails are sent again automatically, once the IP is off the list and no new refusals have come for 2 hours (Send refused e-mails again after). One-time links (password reset, e-mail confirmation), the ticket opened confirmation and staff notices are not sent again: they make no sense later.
  • Mass e-mail bounces. When more than 8% of what a mass e-mail sent within an hour comes back, the mass e-mail is paused with an alert. Old address lists contain dead addresses and spam traps; send only to recently active recipients.

To get off a block list: stop the bulk sending, then request removal (Spamhaus: https://check.spamhaus.org).

Common problems

ProblemCause and solution
No e-mails arriveCheck the e-mail log on the client. If the mail is there, check SMTP and the mail server log. If it isn’t, check mail.mode in config.php (it must be send).
E-mails land in spamSet SPF, DKIM and DMARC for the sender domain, and send from a domain that matches the SMTP server.
A mass e-mail does not startThe massmail:send cron (every minute) is missing.
A client gets no mass e-mailsThe client switched general e-mails off, unsubscribed, the address failed the check, or it is marked as bouncing.

Related