User Account Summary Letter
To change this template login under "serveradmin" or other account with reseller privileges.
On right panel of user account home page click "Mail Templates" link:
Mail Templates settings page will appear:
Click "User Account Summary Letter" link:
Update "From", "CC", "Subject", both HTML and Text templates and click "Save" button to save changes.
User Account Template Variables
The following variables and constructs are supported in "Subject", "HTML Body" and "Text Body" templates:
#Signup# - is equal to "true" if the letter is sent during user account creation; otherwise when user re-sends the letter it is "false".
Can be used in the template as following:
<ad:if test="#Signup#">
This content will be included in the summary during signup only.
</ad:if>#user# - account owner. It is a complex structure with the following available fields:
- Username (string)
- Password (string)
- Email (string)
- SecondaryEmail (string)
- FirstName (string)
- LastName (string)
- FullName (string)
- Address (string)
- City (string)
- Country (string)
- State (string)
- Zip (string)
- PrimaryPhone (string)
- SecondaryPhone (string)
- Fax (string)
- InstantMessenger (string)
- IsDemo (bool)
- IsPeer (bool)
- HtmlMail (bool)
- Created (DateTime)
- Changed (DateTime)
- RoleId (int)
In templates it can be used as following:
Hello, #user.FullName#
Your registered e-mail address is: #user.Email##reseller# - host account. It is a complex structure with the same fields as "user" one.
#Spaces# - the collection of hosting spaces for the account. Each item in the collection is a complex structure with the following fields:
- PackageId (int)
- PlanId (int)
- PackageName (string)
- PurchaseDate
- StatusId (int)
In the templates collection can be iterated as following:
You have the following spaces under your account:
<ad:foreach collection="#Spaces#" var="Space" index="i">
<h2>#Space.PackageName#</h2>
</ad:foreach>#Plans# - the dictionary (key-value pairs) of hosting plans. Each key in #Plans# dictionary is PlanId of hosting plan and each value is a complex structure with the following fields:
- PlanId (int)
- PlanName (string)
- PlanDescription (string)
- SetupPrice (decimal)
- RecurringPrice (decimal)
- RecurrenceUnit (int)
- RecurrenceLength (int)
Both #Spaces# and #Plans# collections can be used together in a single loop as shown below (corresponding space plan is referenced by PlanId):
The following hosting spaces have been created under your account:
<ad:foreach collection="#Spaces#" var="Space" index="i">
Hosting space name: #Space.PackageName#
Hosting plan name: Hosting Plan: #Plans[Space.PlanId].PlanName#
</ad:foreach>#SpaceContexts# - the dictionary (key-value pairs) of hosting space contexts for all spaces in #Spaces# collection. Each key in #SpaceContexts# dictionary is PackageId of hosting space and each value is a complex structure with the following fields:
- Package- hosting space details. It is a complex structure with the fields similar to item in #Spaces# collection.
- Groups- dictionary with resource groups available in hosting space. Key is the name of the resource group and value is a complex structure with the following fields:
- GroupId (int)
- GroupName (string)
- Enabled (bool) - always true for space context groups
- CalculateDiskSpace (bool)
- CalculateBandwidth (bool)
The following group names are currently supported:- OS
- Web
- FTP
- MySQL4
- MySQL5
- DNS
- Statistics
- SharePoint
- MsSQL2000
- MsSQL2005
- MsSQL2008
- Quotas - dictionary with hosting space quotas. Key is the name of the quota and value is a complex structure with the following fields:
- QuotaName (string)
- QuotaAllocatedValue (int) - the maximum number of items (bandwidth in MB, disk space in MB, web sites, FTP accounts, etc.) for this quota. "-1" if unlimited.
- QuotaUsedValue (int) - the number of items (bandwidth in MB, disk space in MB, web sites, FTP accounts, etc.) created for this quota.
The following quota names are currently supported:- OS.Diskspace
- OS.Bandwidth
- OS.Domains
- OS.SubDomains
- OS.ODBC
- OS.FileManager
- OS.AppInstaller
- OS.ExtraApplications
- OS.ScheduledTasks
- OS.ScheduledIntervalTasks
- OS.MinimumTaskInterval
- Web.Sites
- Web.Asp
- Web.AspNet11
- Web.AspNet20
- Web.Php4
- Web.Php5
- Web.Perl
- Web.Python
- Web.CgiBin
- Web.SecuredFolders
- Web.SharedSSL
- Web.Redirections
- Web.HomeFolders
- Web.VirtualDirs
- Web.FrontPage
- Web.Security
- Web.DefaultDocs
- Web.AppPools
- Web.Headers
- Web.Errors
- Web.Mime
- ftp://ftp.accounts/
- Mail.Accounts
- Mail.MaxBoxSize
- Mail.Forwardings
- Mail.Groups
- Mail.MaxGroupMembers
- Mail.Lists
- Mail.MaxListMembers
- MySQL4.Databases
- MySQL4.Users
- MySQL4.Backup
- MySQL5.Databases
- MySQL5.Users
- MySQL5.Backup
- DNS.Editor
- Stats.Sites
- SharePoint.Sites
- SharePoint.Users
- SharePoint.Groups
- MsSQL2000.Databases
- MsSQL2000.Users
- MsSQL2000.MaxDatabaseSize
- MsSQL2000.Backup
- MsSQL2000.Restore
- MsSQL2000.Truncate
- MsSQL2005.Databases
- MsSQL2005.Users
- MsSQL2005.MaxDatabaseSize
- MsSQL2005.Backup
- MsSQL2005.Restore
- MsSQL2005.Truncate
- MsSQL2008.Databases
- MsSQL2008.Users
- MsSQL2008.MaxDatabaseSize
- MsSQL2008.Backup
- MsSQL2008.Restore
- MsSQL2008.Truncate
All dictionaries support the following methods:
- bool ContainsKey(keyName) - allows to check if specified key-value pair exists in the dictionary
- object [keyName] - allows to get specified value from dictionary by its key
Some examples of using "Groups" and "Quotas" dictionaries:
1. To check if "MS SQL 2008" resource exists in the spaces:
<ad:foreach collection="#Spaces#" var="Space" index="i">
Space name: #SpaceContexts[Space.PackageId].PackageName#
<ad:if test="#SpaceContexts[Space.PackageId].Groups.ContainsKey("MsSQL2008")#">
You have an ability to create MS SQL 2008 databases!
</ad:if>2. To show how many MySQL 5 databases and database users are allocated within each space:
<ad:foreach collection="#Spaces#" var="Space" index="i">
Space name: #SpaceContexts[Space.PackageId].PackageName#
<ad:if test="#SpaceContexts[Space.PackageId].Groups.ContainsKey("MySQL5")#">
Databases: #SpaceContexts[Space.PackageId].Quotas["MySQL5.Databases"]#
Users: #SpaceContexts[Space.PackageId].Quotas["MySQL5.Users"]#
<ad:else>
You do not have MySQL 5 resource in this space!
</ad:if>
- 1 Users Found This Useful