Mail Configuration

The mail.php file contains outbound email specific configuration items. This document provides a list of configuration items available in the file, allowing you to modify them as necessary.

Contents

For details on how to set the below configuration items, please create a /config/production/mail.php file and read: Updating Config Files.

Security Policy

The use of merge fields in the operator panel is regulated by a strict security policy. This restricts what is possible for your help desk staff to do in terms of twig code and helps to keep the server secure. The security policy is made up of the following components:

Component Documentation
Tags https://twig.symfony.com/doc/tags/index.html
Filters https://twig.symfony.com/doc/filters/index.html
Methods Methods that can be called on class objects.
Properties Properties that can be accessed on objects.
Functions Global functions must first be defined in /config/twigbridge.php and then copied into this policy if you would like to use them.

Example: Adding a New Function

Create a new file /config/production/mail.php and then copy the policy block that you would like to override from /config/mail.php. Replace 'YOUR-NEW-FUNCTION' with your own:


    <?php

    return [

        'policy' => [

            'functions' => [ 'formatDate', 'route', 'get_logo', 'floor', 'is_gt', 'is_lt', 'json_decode', 'YOUR-NEW-FUNCTION' ],

        ],

    ];

Reply Line

All outbound ticket emails have a reply-above-line prepended to the start of the email, this enables the email parser to clip replies.

Name Description Valid Value(s)
delimiter

Character sequence wrapped around "Please respond above this line" message added to the start of all ticket emails. Used to identify the end of replies via email by searching for a HTML node that starts and ends with the specified character sequence.

Take extreme care when editing as replies via the email channel may not be clipped or may be clipped incorrectly.

alphanumeric, dashes, hashes, exclamation marks
reply_line

The "Please reply above this line" message added to the start of ticket emails generated by SupportPal.

The %s inside a HTML node is REQUIRED for clipping replies via email. It is automatically replaced by mail.delimiter Please reply above this line mail.delimiter. The language variable can be found in resources/lang/*/ticket.php under key "reply_above_line".

Set to an empty string to completely remove the reply line; this means replies via the email channel will not be clipped.

<em style="color: #999;">%s</em><br /><br />