Email variables
From Kolmisoft Wiki
Revision as of 11:32, 12 October 2010 by Vitalija (talk | contribs) (→Calling cards data from ccshop report)
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.
Calling Card purchase
- <%= cc_purchase_details %> - cards list (Number, Pin, Price).
Example
This template:
Hello, <%=full_name%> Your balance in MOR has fallen below <%= 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 fallen below 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" %>