Skip to content

Automatic mails

Newsletter → Configuration → Settings → Automatic mails

This is where sender, subject and text of the mails the plugin sends by itself are set: the four around subscribing and unsubscribing, the notice to you as the administrator — and, as a fallback, the defaults for sending newsletters.

Automatic mails

Up to 2.1.0 this page was called „Sender and subject“

Since 2.1.0 you also set the text here, not just sender and subject — the old name no longer described the page. Before that it was called „Mail configuration". The address has stayed the same each time, bookmarks do not break.


How the inheritance works

Value in the individual newsletter
        ↓ if empty
Value in this mail kind's block
        ↓ if empty
Global defaults

So leaving something empty does not mean „nothing" but „whatever is one level up". For most installations it is enough to fill in the global defaults and leave everything else empty.


Global defaults

Field
Subject Hardly matters: every kind of mail has a sensible subject of its own
Sender The most important setting on the page
CC · BCC Copies. See below
Layout of the mails to subscribers Which template the subscribe and unsubscribe mails use. See below

Layout of the mails to subscribers

Up to 2.1.0 these mails went out as plain text. Since 2.1.0 they can use the same template as your newsletters — with logo, accent colour and legally required details.

Choice
No layout As before. Default for installations that already existed
Like the newsletters The template a new newsletter suggests. Default for new installations
A particular template Only templates built for it are offered

In these mails the parts that belong to a newsletter alone are left out: the unsubscribe link, the sentence „You are receiving this newsletter because …" and the browser view. Logo and legal details stay.

Not every template is offered

The ten supplied ones can do it. The two old ones from earlier versions cannot — they are handwritten and do not know the difference between a newsletter and a system mail. A template of your own can learn it, see Templates.

The sender

Two notations are allowed:

newsletter@bergquell.test
Bergquell Manufaktur <newsletter@bergquell.test>

Use the second. The recipient's mailbox then shows your name and not an address.

The address must be on your own domain

A free mail address as the sender cannot be covered by SPF and DMARC. The big providers increasingly reject such mail or put it in spam — and no plugin can change that, the recipient's mail server decides.

Also set up SPF for your domain and, if your host offers it, DKIM. That is work at the host, not in the plugin, and it decides more about delivery than anything on this page.

A sender address somebody can reach

noreply@ is convenient and a mistake: anyone replying to your newsletter does so because they want something from you. Use an address somebody looks into.

Besides, some spam filters count noreply@ against you.

CC and BCC

CC Goes along and is visible to every recipient
BCC Goes along, invisibly

With a newsletter, neither is almost ever what was meant

Both apply per mail. With 400 recipients, 400 copies go to the address entered — and with CC every one of your subscribers sees that address.

If you want a copy of your newsletter, enter yourself as a subscriber in the group. That is the better way: you then see the same mail everybody else gets.


The six blocks

Block When this mail goes out
Global defaults The fallback for all the others
Newsletter delivery The newsletters themselves
Registration mail (to the subscriber) After the form is submitted, with the confirmation link
Registration confirmation (to the subscriber) After the confirmation link has been clicked
Unsubscribe mail (to the subscriber) After the unsubscribe form is submitted, with the confirmation link
Unsubscribe confirmation (to the subscriber) After the unsubscription has been confirmed
Subscription notice (to the administrator) To you, when somebody subscribes

Every block has subject, sender, CC, BCC — the four mails to subscribers additionally have the HTML mail checkbox and a Text field, and the notice to the administrator also has a Recipient field.

The registration mail is the most important mail of your newsletter

It decides whether a subscription turns into a subscriber. If it does not arrive or lands in spam, the subscription is lost and nobody notices — the entry then sits in the subscriber list under Waiting for confirmation.

After setting up, walk the whole path once: enter your own address, wait for the mail, click the link. And look occasionally at how many entries are waiting for confirmation. If there are many, the mail is not getting through.

Changing the text of these mails

Since 2.1.0 each of the four blocks has a Text field. Below it the placeholders allowed there, and two buttons:

Restore default text Empties the field. The supplied text applies again
Save and send a test mail to me Sends the mail to your own address, with your name as the example subscriber

An empty field is not an empty text but the default. That is more than convenience: an empty field follows later improvements of the text and changes language with your website. Saving the default unchanged therefore gives you an empty field again.

Three things belong in every text of your own

  • The confirmation link in the subscription mail (%bestaetigungslink%). Without it nobody can confirm, and every subscription stays at Waiting for confirmation.
  • The deletion link (%loeschlink%) for somebody who never wanted the subscription.
  • The note on data processing (%datenschutzhinweis%) with the reference to your privacy policy. It is a duty, not decoration — and part of what the consent log records.

Which placeholders apply where is written below each field. %anrede% catches the case without a name: „Hello Max Mustermann," becomes „Hello," instead of „Hello ,".

After every change: send the test mail and try a subscription by hand, clicking the link in the mail.

Template files of your own

The route over files still exists, and it overrides the field in the backend. You only need it if you want to change the structure of the mail rather than the text.

Two files per kind of mail, one for HTML and one for text: mail_register_html.php and mail_register_text.php, plus mail_registerconfirm_…, mail_deregister_…, mail_deregisterconfirm_… and mail_adminnotification_….

Copy the file from wp-content/plugins/…/views/mail/ to one of these places:

Place
<your theme>/wpng_views/mail/
wp-content/uploads/wpng/user_views/mail/ Survives a change of theme

Do not work in the plugin folder

Every change there is gone with the next update.

An existing .phtml still counts

Since 2.0.2 the supplied templates end in .php — only that way can translate.wordpress.org translate their texts. A template of your own may carry either ending: at each place the plugin looks for the .php first, then the .phtml. So you do not have to rename anything.

A file of your own must have defined( 'ABSPATH' ) || exit; in its first line, and the links and the data protection note have to stay — the same three points as above. In the text version nothing is escaped for HTML: an escaped quotation mark would stand there literally as &quot;.

Subject with placeholders

All placeholders are allowed in the subject too:

Newsletter delivery:  %nl_name%
Registration mail:    Please confirm your subscription
Notification:         New newsletter subscription: %abo_email%

No name in the newsletter's subject

Hello %abo_vorname%, our September issue reads as friendly but feels like a mass mailing to many recipients — and for everyone without a first name it says „Hello ,".

Recipient of the subscription notification

Out of the box, your website's administrator address. Several addresses separated by commas.

The mail itself is switched on under Form configuration — without the Notify on subscription checkbox it does not go out.