.. _email-setup:

Email
-----

.. _19.3.1|VOSS-577:
.. _21.1|VOSS-725:
.. _21.1|VOSS-835:

Provider administrators can test email messages and manage email templates, if 
an email SMTP server is set up, and when emails are enabled via the Global 
Settings (Email tab). See: :ref:`SMTP-server` and :ref:`global-settings`.


Send Test Email
...............

This option allows for an email message to be sent from and to a specified email
address and by selecting an email HTML template to test in the email body.


Email HTML Templates
....................

Email templates contain placeholders for the email subject and body
text, which is in HTML markup. The HTML markup and can be modified as required
(for example by using an external WYSIWYG HTML editor).

To modify a template for a specific hierarchy, clone the default to the hierarchy.

When adding a HTML template from the list view, the **Name** can only be 
"Test Email Template" or "Quick Add Subscriber".

By default, the following email templates are provided:

* Test Email Template

  * Clone this template to your hierarchy if you want to customize it.
  * The HTML template name "Test Email Template" cannot be changed.

* Quick Add Subscriber

  * This template is used if the setting is enabled in **Global Settings**.
  * Clone this template to your hierarchy if you want to customize it.
  * The HTML template name "Quick Add Subscriber" cannot be changed.

Values from the Quick Add Subscriber input form can be used to populate the
template by adding variables to the HTML template. The following variables 
are available for the template:

========================  ===========================================
Field name on input form  Variable available in HTML
========================  ===========================================
Username:                 ``{{ pwf.EMAIL.username }}``
First name:               ``{{ pwf.EMAIL.firstname }}``
Last name:                ``{{ pwf.EMAIL.lastname }}``
One time password:        ``{{ pwf.EMAIL.password }}``
One time PIN:             ``{{ pwf.EMAIL.pin }}``
Access Code:              ``{{ pwf.EMAIL.phone_access_code }}``
Email:                    ``{{ pwf.EMAIL.email }}``
Extension:                ``{{ pwf.EMAIL.extension_number }}``
Mobile Number:            ``{{ pwf.EMAIL.mobile_number }}``
Entitlement Profile:      ``{{ pwf.EMAIL.entitlement_profile }}``
Phone Type:               ``{{ pwf.EMAIL.phone_type }}``
Phone Names:              ``{{ pwf.EMAIL.phone_names }}``
Jabber Device Names:      ``{{ pwf.EMAIL.jabber_names }}``
Extension Mobility Name:  ``{{ pwf.EMAIL.extensionmobility_name }}``
========================  ===========================================


Therefore, you can for example include user details as follows in your HTML template:

::

   <p>Username: {{ pwf.EMAIL.username }}</p>
   <p>First name: {{ pwf.EMAIL.firstname }}</p>
   <p>Last name: {{ pwf.EMAIL.lastname }}</p>

.. _email-groups:

Email Groups
.............

A list of email addresses can be added to a group defined
by the value entered in the **Name** field.

This group can then be referenced in settings where email
messages are used and an email group can be specified as the 
recipient, for example in the **Global Settings** for Webex Teams
to specify recipients of generated CSV files.


.. rubric:: Related Topics

* :ref:`SMTP-server`
* :ref:`global-settings`