Difference between revisions of "Email variables"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 2: Line 2:


===Every email===
===Every email===
* '''<%= server_ip %>''' - Server IP where your users should register their SIP/IAX2 devices
* '''<%= server_ip %>''' - server IP where your users should register their SIP/IAX2 devices.
* '''<%= device_type %>''' - Shows users primary device's type. (Device after user registration is set as primary device)
* '''<%= device_type %>''' - shows the user's primary device type. (The device is set as the primary device after user registration).
* '''<%= device_username %>''' - Shows users primary device's username. (Device created after user registration is set as primary device)
* '''<%= device_username %>''' - shows the user's primary device username. (The device is set as the primary device after user registration).
* '''<%= device_password %>''' - Shows users primary device's password. (Device created after user registration is set as primary device)
* '''<%= device_password %>''' - shows the user's primary device password. (The device is set as the primary device after user registration).
* '''<%= login_url %>''' - GUI login url
* '''<%= login_url %>''' - GUI login url.
* '''<%= login_username %>''' - User's username to login to GUI
* '''<%= login_username %>''' - user's username to login to GUI.
* '''<%= username %>''' - same as login_username
* '''<%= username %>''' - same as login_username.
* '''<%= first_name %>''' - First name of the user
* '''<%= first_name %>''' - first name of the user.
* '''<%= last_name %>''' - Last name of the user
* '''<%= last_name %>''' - last name of the user.
* '''<%= full_name %>''' - First name and last name of the user
* '''<%= full_name %>''' - first name and last name of the user.
* '''<%= balance %>''' - User's balance
* '''<%= balance %>''' - user's balance.
* '''<%= nice_balance %>''' - Formated user's balance
* '''<%= nice_balance %>''' - formated user's balance.
* '''<%= warning_email_balance %>''' - Amount below which user should be warned with email.
* '''<%= warning_email_balance %>''' - amount below which user should be warned with email.
* '''<%= nice_warning_email_balance %>''' - Formated amount below which user should be warned with email.
* '''<%= nice_warning_email_balance %>''' - formated amount below which user should be warned with email.
* '''<%= currency %>''' - Default system currencies short name (USD).
* '''<%= currency %>''' - default system currency's short name (USD).
* '''<%= user_email %>''' - Users email address
* '''<%= user_email %>''' - user's email address.
* '''<%= company_email %>''' - Company email address
* '''<%= company_email %>''' - company email address.
* '''<%= email %>''' - Company email address
* '''<%= email %>''' - company email address.
* '''<%= company %>''' - Company title
* '''<%= company %>''' - company title.
* '''<%= primary_device_pin %>''' - PIN of users default device. Default device is created the moment user registers, so this variable can be used universally.  
* '''<%= primary_device_pin %>''' - PIN of user's default device. The fault device is created the moment the user registers, so this variable can be used universally.  


===After registration===
===After registration===


* '''<%= login_password %>''' - User's password to login to GUI
* '''<%= login_password %>''' - user's password to login to GUI.
* '''<%= user_ip %>''' - User's IP address
* '''<%= user_ip %>''' - user's IP address.


===Cyberplay payment report===
===Cyberplay payment report===


* '''<%= currency %>''' - Payment currency
* '''<%= currency %>''' - payment currency
* '''<%= amount %>''' - Payment amount
* '''<%= amount %>''' - payment amount
* '''<%= date %>''' - Payment date
* '''<%= date %>''' - payment date
* '''<%= auth_code %>''' - Authorization code  
* '''<%= auth_code %>''' - Authorization code  
* '''<%= transaction_id %>''' - Payment transaction ID provided by Cyberplat
* '''<%= transaction_id %>''' - payment transaction ID provided by Cyberplat
* '''<%= customer_name %>''' - Payment customer name provided by Cyberplat
* '''<%= customer_name %>''' - payment customer name provided by Cyberplat
* '''<%= description %>''' - Payment details provided by Cyberplat
* '''<%= description %>''' - payment details provided by Cyberplat


=== Example ===
=== Example ===
Line 49: Line 49:
  KOLMISOFT
  KOLMISOFT
</pre>
</pre>
Will result in email similar to this:  
 
will result in an email similar to this:  


<pre>
<pre>
Line 64: Line 65:
= Illegal usage =  
= Illegal usage =  


You will get error when you try to use non-existent variables.
You will get an error when you try to use non-existent variables.


Also you cannot use something like this: <%= "www.kolmisoft.com" %>
Also, you cannot use something like this: <%= "www.kolmisoft.com" %>


<br><br>
<br><br>
= See also =
= See also =
* [[Configuration from GUI#Emails | Email Configuration]]
* [[Configuration from GUI#Emails | Email Configuration]]

Revision as of 12:14, 2 May 2010

These variables can be used in emails:

Every email

  • <%= server_ip %> - server IP where your users should register their SIP/IAX2 devices.
  • <%= device_type %> - shows the user's primary device type. (The device is set as the primary device after user registration).
  • <%= device_username %> - shows the user's primary device username. (The device is set as the primary device after user registration).
  • <%= device_password %> - shows the user's primary device password. (The device is set as the primary device after user registration).
  • <%= login_url %> - GUI login url.
  • <%= login_username %> - user's username to login to GUI.
  • <%= username %> - same as login_username.
  • <%= first_name %> - first name of the user.
  • <%= last_name %> - last name of the user.
  • <%= full_name %> - first name and last name of the user.
  • <%= balance %> - user's balance.
  • <%= nice_balance %> - formated user's balance.
  • <%= warning_email_balance %> - amount below which user should be warned with email.
  • <%= nice_warning_email_balance %> - formated amount below which user should be warned with email.
  • <%= currency %> - default system currency's short name (USD).
  • <%= user_email %> - user's email address.
  • <%= company_email %> - company email address.
  • <%= email %> - company email address.
  • <%= company %> - company title.
  • <%= primary_device_pin %> - PIN of user's default device. The fault device is created the moment the user registers, so this variable can be used universally.

After registration

  • <%= login_password %> - user's password to login to GUI.
  • <%= user_ip %> - user's IP address.

Cyberplay payment report

  • <%= currency %> - payment currency
  • <%= amount %> - payment amount
  • <%= date %> - payment date
  • <%= auth_code %> - Authorization code
  • <%= transaction_id %> - payment transaction ID provided by Cyberplat
  • <%= customer_name %> - payment customer name provided by Cyberplat
  • <%= description %> - payment details provided by Cyberplat

Example

This template:

 Hello, <%=full_name%>

 Your balance in MOR has run out bellow <%= nice_warning_email_balance %> <%= currency %> and now is <%= nice_balance %> <%= currency %>.
 Please login to <%= login_url %> and replenish it.

 Yours Sincerely,
 KOLMISOFT

will result in an email similar to this:

 Hello, John Smith

 Your balance in MOR has run out bellow 10.00 USD and now is 5.67 USD.
 Please login to http://your_site/billing and replenish it.

 Yours Sincerely,
 KOLMISOFT



Illegal usage

You will get an error when you try to use non-existent variables.

Also, you cannot use something like this: <%= "www.kolmisoft.com" %>



See also