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 %>''' - server IP where your users should register their SIP/IAX2 devices. | ||
* '''<%= device_type %>''' - | * '''<%= device_type %>''' - shows the user's primary device type. (The device is set as the primary device after user registration). | ||
* '''<%= device_username %>''' - | * '''<%= device_username %>''' - shows the user's primary device username. (The device is set as the primary device after user registration). | ||
* '''<%= device_password %>''' - | * '''<%= 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 %>''' - | * '''<%= login_username %>''' - user's username to login to GUI. | ||
* '''<%= username %>''' - same as login_username | * '''<%= username %>''' - same as login_username. | ||
* '''<%= first_name %>''' - | * '''<%= first_name %>''' - first name of the user. | ||
* '''<%= last_name %>''' - | * '''<%= last_name %>''' - last name of the user. | ||
* '''<%= full_name %>''' - | * '''<%= full_name %>''' - first name and last name of the user. | ||
* '''<%= balance %>''' - | * '''<%= balance %>''' - user's balance. | ||
* '''<%= nice_balance %>''' - | * '''<%= nice_balance %>''' - formated user's balance. | ||
* '''<%= warning_email_balance %>''' - | * '''<%= warning_email_balance %>''' - amount below which user should be warned with email. | ||
* '''<%= nice_warning_email_balance %>''' - | * '''<%= nice_warning_email_balance %>''' - formated amount below which user should be warned with email. | ||
* '''<%= currency %>''' - | * '''<%= currency %>''' - default system currency's short name (USD). | ||
* '''<%= user_email %>''' - | * '''<%= user_email %>''' - user's email address. | ||
* '''<%= company_email %>''' - | * '''<%= company_email %>''' - company email address. | ||
* '''<%= email %>''' - | * '''<%= email %>''' - company email address. | ||
* '''<%= company %>''' - | * '''<%= company %>''' - company title. | ||
* '''<%= primary_device_pin %>''' - PIN of | * '''<%= 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 %>''' - | * '''<%= login_password %>''' - user's password to login to GUI. | ||
* '''<%= user_ip %>''' - | * '''<%= user_ip %>''' - user's IP address. | ||
===Cyberplay payment report=== | ===Cyberplay payment report=== | ||
* '''<%= currency %>''' - | * '''<%= currency %>''' - payment currency | ||
* '''<%= amount %>''' - | * '''<%= amount %>''' - payment amount | ||
* '''<%= date %>''' - | * '''<%= date %>''' - payment date | ||
* '''<%= auth_code %>''' - Authorization code | * '''<%= auth_code %>''' - Authorization code | ||
* '''<%= transaction_id %>''' - | * '''<%= transaction_id %>''' - payment transaction ID provided by Cyberplat | ||
* '''<%= customer_name %>''' - | * '''<%= customer_name %>''' - payment customer name provided by Cyberplat | ||
* '''<%= description %>''' - | * '''<%= description %>''' - payment details provided by Cyberplat | ||
=== Example === | === Example === | ||
Line 49: | Line 49: | ||
KOLMISOFT | KOLMISOFT | ||
</pre> | </pre> | ||
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" %>