11. Email templates

11.1. Email events
11.2. Initial template values and template variables
11.3. Password reset email template
11.4. New subscriber notification email template
11.5. Invoice email template
11.6. Email templates management

11.1. Email events

The sip:provider CE allows to customize content of the emails sent on the following actions:

  • Web password reset requested. Email will be sent to the subscriber, whom password was requested for resetting. If the subscriber doesn’t have own email, letter will be sent to the customer, who owns the subscriber.
  • New subscriber created. Email will be sent to the newly created subscriber or to the customer, who owns new subscriber.
  • Letter with the invoice. Letter will be sent to the customer.

11.2. Initial template values and template variables

Default email templates for each of the email events are inserted on the initial sip:provider CE database creation. Content of the default template is described in the appropriate sections. Default email templates aren’t linked to any reseller and can’t be changed through sip:provider CE Panel. They will be used to initialize default templates for the newly created reseller.

Each email template refers to the values from the database using special mark-ups "[%" and "%]". Each email template has fixed set of the variables. Variables can’t be added or changed without changes in the sip:provider CE Panel code.

11.3. Password reset email template

Email will be sent after subscriber or subscriber administrator requested password reset for the subscriber account. Letter will be sent to the subscriber. If subscriber doesn’t have own email, letter will be sent to the customer owning the subscriber.

Default content of the password reset email template is:

Template name

passreset_default_email

From

default@sipwise.com

Subject

Password reset email

Body

Dear Customer,

Please go to [%url%] to set your password and log into your self-care interface.

Your faithful Sipwise system

--
This is an automatically generated message. Do not reply.

Following variables will be provided to the email template:

  • [%url%]: specially generated url where subscriber can define his new password.
  • [%subscriber%]: username@domain of the subscriber, which password was requested for reset.

11.4. New subscriber notification email template

Email will be sent on the new subscriber creation. Letter will be sent to the newly created subscriber if it has an email. Otherwise, letter will be sent to the customer who owns the subscriber.

[Note]

By default email content template is addressed to the customer. Please consider this when create the subscriber with an email.

Template name

subscriber_default_email

From

default@sipwise.com

Subject

Subscriber created

Body

Dear Customer,

A new subscriber [%subscriber%] has been created for you.

Your faithful Sipwise system

--
This is an automatically generated message. Do not reply.

Following variables will be provided to the email template:

  • [%url%]: specially generated url where subscriber can define his new password.
  • [%subscriber%]: username@domain of the subscriber, which password was requested for reset.

11.5. Invoice email template

Template name

invoice_default_email

From

default@sipwise.com

Subject

Invoice #[%invoice.serial%] from [%invoice.period_start_obj.ymd%] to [%invoice.period_end_obj.ymd%]

Body

Dear Customer,

Please find your invoice #[%invoice.serial%] for [%invoice.period_start_obj.month_name%], [%invoice.period_start_obj.year%] in attachment of this letter.

Your faithful Sipwise system

--
This is an automatically generated message. Do not reply.

Variables passed to the email template:

  • [%invoice%]: container variable for the invoice information.
[Note]Invoice fields
  • [%invoice.serial%]
  • [%invoice.amount_net%]
  • [%invoice.amount_vat%]
  • [%invoice.amount_total%]
  • [%invoice.period_start_obj%]
  • [%invoice.period_end_obj%]

The fields [%invoice.period_start_obj%] and [%invoice.period_end_obj%] provide methods of the perl package DateTime for the invoice start date and end date. Further information about DateTime can be obtained from the package documentation:

man DateTime

  • [%provider%]: container variable for the reseller contact. All database contact values will be available.
  • [%client%]: container variable for the customer contact.
[Note]Contact fields example for the "provider". Replace "provider" to client to access proper "customer" contact fields.
  • [%provider.gender%]
  • [%provider.firstname%]
  • [%provider.lastname%]
  • [%provider.comregnum%]
  • [%provider.company%]
  • [%provider.street%]
  • [%provider.postcode%]
  • [%provider.city%]
  • [%provider.country%]
  • [%provider.phonenumber%]
  • [%provider.mobilenumber%]
  • [%provider.email%]
  • [%provider.newsletter%]
  • [%provider.faxnumber%]
  • [%provider.iban%]
  • [%provider.bic%]
  • [%provider.vatnum%]
  • [%provider.bankname%]
  • [%provider.gpp0 - provider.gpp9%]

11.6. Email templates management

Email templates linked to the resellers can be customized in the email templates management interface. For the administrative account email templates of all the resellers will be shown. Respectively for the reseller account only owned email templates will be shown.

Email templates management interface

To create create new email template press button "Create Email Template".

Email templates form

On the email template form all fields are mandatory:

  • Reseller: reseller who owns this email template.
  • Name: currently only email template with the following names will be considered by the sip:provider CE on the appropriate event Section 11.1, “Email events” :

    • passreset_default_email;
    • subscriber_default_email;
    • invoice_default_email;
  • From Email Address: email address which will be used in the From field in the letter sent by the sip:provider CE.
  • Subject: Template of the email subject. Subject will be processed with the same template variables as the email body.
  • Body: Email text template. Will be processed with appropriate template variables.