How to add user's email address to agent's email notification

Last modified:


You can add user's email address into agents notifications using this line of code:

{% if notification.user.is_staff and notification.topic.author.email %}<p>Email: {{notification.topic.author.email}}</p>{% endif %}

So, to apply it open your "New topic" notification template and insert something like this:

{% if notification.topic.status.name %}<p align="right">
    <span style="background-color:#{{notification.topic.status.color}};color:#ffffff;padding:5px;"><strong>{{notification.topic.status.name}}</strong></span>
</p>{% endif %}
<p>Dear {{notification.user.name}},</p>
<p>New topic has been posted by {{notification.topic.author.name}}.</p>
{% if notification.user.is_staff and notification.topic.author.email %}<p>Email: {{notification.topic.author.email}}</p>{% endif %}
{% ue_notification_frame label="Click here to open topic" label_url=notification.url header=notification.topic.header text=notification.topic.description %}

This article was helpful for 4 people. Is this article helpful for you?
Report an error
Still need help? New ticket