-
Notifications
You must be signed in to change notification settings - Fork 16
Mailing
All mails in BNote 3.0.0 and above are handled by one central class called Mailing
in src/logic/mailing.php
. The API should seem obvious to you, but the usage of mail templates and parameters may not be, thus here is the documentation.
In data/mail_template.html
is the base template for all mails issued by BNote. You can edit it in plain HTML/CSS if you want to change the layout, colors, etc. This file is read in the Mailing
class and all its parameters are replaced by the given values.
Parameters
Parameters in the mail template are surrounded by the percent character. If you want to print the title somewhere just use %title%
. Here are the available parameters:
-
encoding
: by default "utf-8" is used. -
title
: The subject of the e-mail. -
content
: It is always HTML, but if you did not format your mail-text as HTML, it will just be a plain paragraph. -
link
: The URL to the BNote system the mail is issued from. This parameter can be set in the configuration (config/config.xml
) -
link_name
: Caption of the BNote system's link. By default it's your band's name (parametercompany
inconfig/company.xml
). -
footer
: Uses the translation keymail_footerText
. You can change that in the lang/... directory.
Mails are issued in these modules:
- Aufgaben: plain-text message
- Kommunikation: HTML-text from the editor
- Kontakte: plain-text message
- Login: plain-text message
- Start: HTML-messaage without header
- User: plain-text message
For demonstration purposes you can turn all mailings off by enabling the <DemoMode>true</DemoMode>
setting in config/config.xml
.
Stand: 21.09.2020, BNote Version 3.4.4