Skip to content

Mailing

Matti Maier edited this page Jan 7, 2018 · 1 revision

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.

Mail Templates

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 (parameter company in config/company.xml).
  • footer: Uses the translation key mail_footerText. You can change that in the lang/... directory.

Mail Usages

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

Demo Mode

For demonstration purposes you can turn all mailings off by enabling the <DemoMode>true</DemoMode> setting in config/config.xml.

Clone this wiki locally