# Email Templates

Information here relates to the email templates in Maian Support. For easy editing the email templates are all .txt files.

Email Template Location

All txt files are located at: content/language/*lang*/mail-templates/*.txt

HTML & Plain Text

Maian Support sends out plain text and html formatted emails by default, unless you have the PHP mail function enabled, which is ONLY plain text. To keep things nice and easy, a single template is used for both formats.

Template Structure

The format of a txt template is basically as follows:
HEADER
<-{separater}->
CONTENT
<-{separater}->
FOOTER
<-{separater}-> is used to separate the content as shown. 2 separaters MUST exist in each file.

HTML WRAPPER

For the HTML format, the txt files are wrapped in a HTML wrapper. This is located at: content/language/*lang*/mail-templates/html-wrapper.html
Any links will be made clickable automatically and the data is split and added to the template via the {HEADER},{CONTENT} & {FOOTER} vars which should NOT be removed.

Variables in Email Templates

Any variable between braces, eg: {code} must NOT be removed. These are auto parsed by the system.

PHP Mailer

Maian Support uses the PHP Mailer to send mail via smtp or the PHP mail function.
All mail ops can be found in the following location: control/classes/mailer/*