Templates

|  | Templates

Templates files are the core of the CGI's flexibility. The templates are used to generate the look and feel of the product for your customers. The templates are basically HTML code with our '||variables||' and '||cmds||'. WebMail comes with a few templates sets when you download and install it. These are: 'Panel', 'Smooth', and 'Surge', with various color and language options for "Smooth" and "Surge". Each template set was designed with a difference purpose in mind but all are easy to use. "Surge" is fast, simple, multi language and has few images. "Smooth" is image rich, multi language and great for fast connections "Panel" is an earlier, but updated template set with proven reliability Many customers have changed WebMail's look completely, and a few examples of these sites can been seen in our Gallery. 'Panel' and 'Smooth' tpl sets are complex and we suggest that, unless you are sure about javascript and the problems between different browsers (IE / Netscape / Opera etc.), that you do not change these tpl sets. If you you wish to generate your own template design we suggest that you use the 'Surge' as a base reference.

|  | Template Files

Different WebMail template sets can use different template files names. We have generated a simple guide on some of the default templates that webmail comes with. Panel, Surge and Smooth Template Guides Below is a list of the default template files, and a brief description of what each is for. Each file has the option of having a frame version, which has the same name with the suffix f for frames. For a frame login the frame.tpl is loaded and menubar.tpl is placed in the top frame.
File Name | Description
addrbook.tpl | For editing/adding address books
attach.tpl | For adding/deleting/sending attachments.
bookonly.tpl | Pop up address book (called from send.tpl)
bulletin.tpl | This shows the list of bulletins which the user is allowed to see
ch_pass.tpl | This is used to change passwords when using POPPASSD. See the link Changing Passwords for more details
config.tpl | User Configuration Page (or options page)
confirm.tpl | The template that is displayed when a confirm message has been sent.
confirm.msg | The body of the confirm message that is sent out.
del_fail.tpl | When the user runs out of disk quota and tries to delete Email, this template is displayed.
email.tpl | The popup Email page. Used on the forwarding page.
error.tpl | Used to display any error messages
external.tpl | This is the page which is used when displaying global external address books
folder.tpl | Folder management
forward.tpl | For forwarding one or more messages
group.tpl | Used for creating a list of Emails.
help.tpl | User Manual
item.tpl | A single mail item
large.tpl | This template is used when a large Email is detected and needs to be downloaded. This template has the same layout as the item.tpl.
list.tpl | A list of new mail messages
login.tpl | The first page shown when WebMail is run. This handles the user login
logout.tpl | Logout Screen to be displayed
mail.tpl | This template is used for automatic login.
manager.tpl | This template is the manager's option page.
menubar.tpl | Menu bar is used if using Frame Login rather than normal login
new_msg.tpl | This is the pop up list of new messages only.
newuser.tpl | This is the first template that New Users see (defaults to list.tpl is not available)
nfmenu.tpl | This is the non-frame menubar, that the non-frame templates include.
ok.tpl | Used to display any successful actions, eg Mail sent
pick.tpl | Displays pick list, distribution list and address book
search.tpl | For searching for Emails.
send.tpl | For sending a new mail message
send_bull.tpl | This is the template that is used to create new bulletins
sp_dic.tpl | This shows the words in your private dictionary
sp_fix.tpl | This template, in conjunction with sp_show.tpl, is used to change spelling mistakes, or add words to the private dictionary. (java script only)
sp_show.tpl | This is used to show spelling errors, if there are any. (java script only)
stud.tpl | This is the popup INBOX that reloads after 5 mins.
todo.tpl | This template is used to create items on the user's todo list.
There are other example sets of template files available. If you create a particularly nice set you might like to share them with others. If so, send them to netwin@netwinsite.com and we will add them to this list.

|  | CGI Commands

> The template files contain ordinary html plus ||variables||. These variables are setup by the CGI commands and template commands. The CGI commands may take the form of a submit button with a particular name, a hidden cmd (or xcmd) field inside a form or as a query in the form cmd=xyz Every CGI cmd can be set up as a button, hidden or as part of a query. When commands are set up as buttons there must be no hidden command field in the form, or this will override the button.
> eg. |
> Button: | <input type=submit name="xxxxxx" value="any thing">
> Hidden Field: | <input type=hidden name="cmd" value="xxxxxx">
> Query: | <a href="||action||?cmd=xxxxxx&utoken=||utoken||">any thing</a>
The list of valid CGI commands is show below. This list also shows which default template is displayed. The input and output variables that are needed/setup are also displayed for each command. In addition, some commands change user settings are also displayed. Any variable in the lists that start with a '~' is an ini setting.
CMD | Function | Template
--- | --- | ---
url | This will make the CGI display the link provided instead. | (CGI)
Input Variables:
url | The 'http' link that you want the CGI to display.
register | Displays the registering screen. | (CGI)
manager | Displays the manager's screen. | (manager.tpl)
login | This will login a user. | (frame.tpl or list.tpl)
Input Variables:
user | The user name to login to.
pass | The user's password.
host | The host that the user wishes to connect to. (optional)
tcode | This is used to determine whether the login page is fresh. You must have this unless you have: no_tcode true in your ini file
Output Variables:
_played_sound | Setup to '0' if the sound has not played.
utoken | The user's token, which must be passed to CGI every time.
User settings:
_selected_tpl | This is used to determine which templates the user is using.
wml_agent | The last wml agent used.
agent | The last web browser used.
frames | Set to '1' if the user is using the frames templates.
quick_login | This will perform a login without connecting to the mail server to get Emails. | (frame.tpl or list.tpl)
Input Variables:
same as 'login'
Output Variables:
same as 'login'
User settings:
same as 'login'
auto_login | This will perform an auto-login for a user. | (frame.tpl or list.tpl)
Input Variables:
same as 'login'
Output Variables:
same as 'login'
User settings:
same as 'login'
netwin_login | This command is used to go between NetWin products. | (url)
Input Variables:
utoken | The user's utoken.
~netwin_autologin | The list of information required to perform a NetWin login.
logout | This will logout a user. | (logout.tpl)
Input Variables:
utoken | The user's utoken.
logout_go | This will logout a user, and then go directly to a URL. | (url)
Input Variables:
utoken | The user's utoken.
url | The url which the user should be sent to.
menubar | This will display the menubar. Used in frame.tpl only | (menubar.tpl)
Input Variables:
utoken | The users utoken.
reload_mail | This will check your INBOX for new mail. | (list.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (optional: defaults INBOX)
Output Variables:
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
check_mail | This will display your INBOX. | (list.tpl)
Input Variables:
utoken | The user's utoken.
Output Variables:
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
list | This will list the folder provided. | (list.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (optional: defaults INBOX)
timezone | The timezone which all the messages are displayed in. (optional)
sort_on | This is the field to sort on. ie. 'Subject:', 'h_bytes', 'Date:' (optional)
sort_reverse | When set to 'true', the order of the sort is reverse.
sort_method | The method used to compare the values. ie. 'text', 'date', 'number', 'read_unread', 'new', 'draft'
Output Variables:
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
soft_list | (exactly the same as 'list', but does not require a lock) | (list.tpl)
Input Variables: - see 'list'
Output Variables:- see 'list'
item* | Displays the message. | (item.tpl or large.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (optional: defaults INBOX)
timezone | The timezone which the message is displayed in. (optional)
max_email_size | This ini setting is used to determine whether the Email is large and if it is, defaults to displaying the 'large.tpl' instead of the 'item.tpl'.
force_download | When set to true, will always download Email and display the item.tpl.
Output Variables:
item_id | The position in the list of the Email messages.
v_raw | The user's sticky settings for displaying the Email message in Raw format.
v_headers | The user's sticky settings for displaying the Email message header.
v_font | The user's sticky settings for displaying the Email message in variable width font.
v_inline | The user's sticky settings for displaying the Email message images/html/text attach files inline.
v_show_alt | The user's sticky settings for displaying the Email message's alternative part as well.
show_email | Setup to display the decoded Email.
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
soft_item* | (exactly the same as 'item*', but does not require a lock) | (item.tpl or large.tpl)
Input Variables: - see 'item'
Output Variables:- see 'item'
itempart* | Displays the message subpart. | (N/A)
Input Variables:
utoken | The user's utoken.
part | Shows which mime part to display.
subpart | Shows which part of the mime part to display.
itemflag* | Changes an item flag status. | (list.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
flag | The list of flags to change the status to.
saveaddr* | This saves the from/reply Email address to the pick list. | (item.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (optional: defaults INBOX)
saveaddrbook* | This saves the from/reply Email address to the address book. | (addrbook.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (optional: defaults INBOX)
Output Variables:
abk_email | This is the Email address which the CGI sets up for the address book.
delitem* | This will delete the message. | (list.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
ignore_trash | When 'true', only flags the message for deletion, does not move it to the Trash folder. (optional).
force_empty | When 'true', deletes all messages flagged for deletion in the current folder. These messages are permanently deleted, and do not go to the Trash folder (optional). Often used in conjunction with ignore_trash to delete a message without it going to the trash (eg. ...&force_empty=true&ignore_trash=true&...)
delitem_next* | This will delete the message, and then display the next message. | (item.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
ignore_trash | When 'true', only flags the message for deletion, does not move it to the Trash folder. (optional).
force_empty | When 'true', deletes all messages flagged for deletion in the current folder. these messages are permanently deleted, and do not go to the Trash folder (optional). Often used in conjunction with ignore_trash to delete a message without it going to the trash (eg. ...&force_empty=true&ignore_trash=true&...)
delsel | This will delete the messages which have been selected. | (list.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
sel_* | The list of items to delete.
ignore_trash | When 'true', only flags the message for deletion, does not move it to the Trash folder. (optional).
force_empty | When 'true', deletes all messages flagged for deletion in the current folder. These messages are permanently deleted, and do not go to the Trash folder (optional). Often used in conjunction with ignore_trash to delete a message without it going to the trash (eg. ...&force_empty=true&ignore_trash=true&...)
moveitem* | This will move the message to the selected folder. | (list.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
dstfld | The destination folder name, where the Email message will be moved.
movesel | This moves the selected messages to a folder. | (list.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
sel_* | The list of items to delete.
dstfld | The destination folder name, where the Email message will be moved to.
copyitem* | This copies the message to the selected folder. | (list.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (optional: defaults INBOX)
dstfld | The destination folder name, where the Email message will be copied to.
copysel | This copies the selected messages into a folder. | (list.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (optional: defaults INBOX)
sel_* | The list of items to copy.
dstfld | The destination folder name, where the Email message will be copied.
forward_edit* | This forwards the message, allowing editing of the Email message. It also preserves the attachments. | (send.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
Output Variables:
This 'forward_edit' command has the same output variables as the 'msg_reply' command.
forward* | This forwards the message. | (forward.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
Output Variables:
reply reply_email reply_personal | The default reply of the Email, which is built from the dflt_reply in the user.dat file.
fwd_list | The list of Email UIDL's that are to be forwarded.
nfwd | The number of Emails which are being forwarded.
v_myfrom | The default which decides whether or not the user's from address will be used.
v_supheader | This setting is used to determine whether the headers of the Email should be suppressed.
picklist | The list of Email addresses in the pick list and the distribution list.
forwardsel | This forwards the selected messages. | (forward.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
sel_* | The list of items to delete.
Output Variables:
fwd_list | The list of Email UIDL's that are to be forwarded.
nfwd | The number of Emails which are being forwarded.
v_myfrom | The default which decides whether or not the user's from address will be used.
v_supheader | This setting is used to determine whether the headers of the Email should be suppressed.
picklist | The list of Email addresses in the pick list and the distribution list.
forward_send | This sends the forwarded message. | (ok.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
fwd_list | The list of Email UIDL's that are to be forwarded.
fwd_note | The note that will be attached to the Email being forwarded.
forward_senddel | This sends the forwarded message and deletes the message. | (ok.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload.
fwd_list | The list of Email UIDL's that are to be forwarded.
fwd_note | The note which will be attached to the Email which is being forwarded.
msg_save* | This will save the Email to disk. | (N/A)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (optional: defaults INBOX)
msg_reply* | This replies to the message's 'From' field. | (send.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (Optional: defaults INBOX)
reply_prefix | The prefix of the message. (Optional: defaults '> ')
Output Variables:
to cc | The unchanged 'To:' and 'Cc:' header of the Email
from from_email from_personal | Shows who the Email came from. This is where you can display whether the address uses the personal, the complete or the Email format. ie. Complete: "Lynden" <lynden@1.2.3.4> Email: lynden@1.2.3.4 Personal: "Lynden"
subject | The subject of the Email.
date | The date of the Email
h_from h_from_email h_from_personal | The From: field where the message should go.
h_subject | The default subject of the reply Email.
quote_body | The body of the Email, converted to display inside the html page.
reply reply_email reply_personal | The default reply of the Email, which is built from the dflt_reply in the user.dat file.
host_user* host_name* | Used for the pull down list of multiple host accounts.
addsig | Set to 'checked' if the user sent a signature the previous time.
send_autocc | Set to 'checked' if the user sent a copy to herself the previous time.
copyself | Set to 'checked' if the user saved in the sent folder the previous time.
pick_item | The list of items in the pick list and distribution list.
picklist | The list of items in the pick list and distribution list.
msg_replyall* | This replies to a message's 'To, CC, BCC' fields. | (send.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (Optional: defaults INBOX)
reply_prefix | The prefix of the message. (Optional: defaults '> ')
Output Variables:
to cc | The unchanged 'To:' and 'CC:' header of the Email
from from_email from_personal | Shows who the Email came from and who to reply to. This is where you can display whether the address uses the personal, the complete or the Email format. ie. Complete: "Lynden" <lynden@1.2.3.4> Email: lynden@1.2.3.4 Personal: "Lynden"
subject | The subject of the Email.
date | The date of the Email
h_cc | The list of Emails that should be CC'ed to.
h_from | The From: field where the message should be sent.
h_subject | The default subject of the reply Email.
quote_body | The body of the Email, converted to display inside the html page.
reply reply_email reply_personal | The default reply of the Email, which is built from the dflt_reply in the user.dat file.
host_user* host_name* | Used for the pull down list of multiple host accounts.
addsig | Set to 'checked' if the user sent a signature the previous time.
send_autocc | Set to 'checked' if the user sent a copy to herself the previous time.
copyself | Set to 'checked' if the user saved in the sent folder the previous time.
pick_item | The list of items in the pick list and distribution list.
picklist | The list of items in the pick list and distribution list.
msg_draft* | This treats the message as a draft and sets up the Email to be edited and sent. | (item.tpl)
Input Variables:
utoken | The user's utoken.
fld/folder | The folder to reload. (Optional: defaults INBOX)
Output Variables:
h_from | The From: field where the message should be sent.
h_cc | The list of Emails that should be CC'ed to.
h_bcc | The list of Emails that should be BCC'ed to.
h_subject | The default subject of the Email.
quote_body | The body of the Email, converted to display inside the html page.
reply reply_email reply_personal | The default reply of the Email, which is build from the dflt_reply in the user.dat file.
host_user* host_name* | Used for the pull down list of multiple host accounts.
addsig | Set to 'checked' if the user sent a signature the previous time.
send_autocc | Set to 'checked' if the user sent a copy to herself the previous time.
copyself | Set to 'checked' if the user saved in the sent folder the previous time.
pick_item | The list of items in the pick list and distribution list.
picklist | The list of items in the pick list and distribution list.
msg_new | This displays a new message to send. | (send.tpl)
Input Variables:
utoken | The user's utoken.
keep_attach | When set to 'true', the save attachments are not cleared. (Optional: defaults false)
Output Variables:
reply reply_email reply_personal | The default reply of the Email, which is built from the dflt_reply in the user.dat file.
host_user* host_name* | Used for the pull down list of multiple host accounts.
addsig | Set to 'checked' if the user sent a signature the previous time.
send_autocc | Set to 'checked' if the user sent a copy to herself the previous time.
copyself | Set to 'checked' if the user saved in the sent folder the previous time.
pick_item | The list of items in the pick list and distribution list.
picklist | The list of items in the pick list and distribution list.
msg_search | Displays the Email search page. | (search.tpl)
Input Variables:
utoken | The user's utoken.
dosearch | Performs the Email search. | (search.tpl)
Input Variables:
utoken | The user's utoken.
search_body | The search string for the body of the Email. (Optional)
search_body_size | The number of characters in the body of the Email to search. (Optional)
search_subject | The search string in the subject field.
search_from | The search string in the from field.
search_mode | When set to 'true', the search is an 'OR' search.
multi_sel_fld | The list of folders which the search is to be performed in.
Output Variables:
The results from the search are generated by the ||begin_search||...||end_search|| command.
add_attach | Displays the attached Emails. | (attach.tpl)
Input Variables:
utoken | The user's utoken.
Output Variables:
attach_num | The number of attachments which are going to be sent.
attach_msg | This will add a message to the list of attachments. | (attach.tpl)
Input Variables:
utoken | The user's utoken.
attach | The list of attached files.
Output Variables:
attach_num | The number of attachments which are going to be sent.
attach_send | This will display back the Email message which is to be sent. | (send.tpl)
Input Variables:
utoken | The user's utoken.
Output Variables:
h_cc | The list of Emails that should be CC'ed to.
h_from | The From: field where the message should be sent.
h_subject | The default subject of the reply Email.
Quote_body | The body of the Email, converted to display inside the html page.
reply reply_email reply_personal | The default reply of the Email, which is built from the dflt_reply in the user.dat file.
host_user* host_name* | Used for the pull down list of multiple host accounts.
addsig | Set to 'checked' if the user sent a signature the previous time.
send_autocc | Set to 'checked' if the user sent a copy to self the previous time.
copyself | Set to 'checked' if the user saved in the sent folder the previous time.
pick_item | The list of items in the pick list and distribution list.
picklist | The list of items in the pick list and distribution list.
attach_del | This will delete the highlighted message | (attach.tpl)
Input Variables:
utoken | The user's utoken.
selected_attach | The selected list of attached files to remove.
Output Variables:
attach_num | The number of attachments which are going to be sent.
send | This sends the message | (ok.tpl)
Input Variables:
utoken | The user's utoken.
to | The list of people that the message should be sent to.
CC | The list of people that a carbon copy should be sent to. (Optional)
BCC | The list of people that a blind carbon copy should be sent to. (Optional)
attach | The list of attached files. (Optional)
reply | The reply-to field of the Email message. (Optional)
from | The From: header of the Email. (Optional, defaults to user@domain)
subject | The subject of the Email. (Optional)
message | The body of the Email message. (Optional)
addsig | If 'checked', a signature will be sent. (Optional)
send_autocc | If 'checked, a copy will be sent to self. (Optional)
copyself | If 'checked', a copy will be saved in the sent folder. (Optional)
priority x-priority | This is the text priority level of the Email. (Optional)
content-type | This is the content-type of this message. (Optional)
confirm | When set to 'read', the message will be sent flagged, so that the recipient will be reminded to reply, telling you that the message has been read.(Optional)
save_draft | Save the Email message as a draft message. | (ok.tpl)
Input Variables:
utoken | The user's utoken.
dstfld | The folder which the draft message will be placed in.
to | The list of people that the message should be sent to.
CC | The list of people that a carbon copy should be sent to. (Optional)
BCC | The list of people that a blind carbon copy should be sent to. (Optional)
attach | The list of attached files. (Optional)
reply | The reply-to field of the Email message. (Optional)
subject | The subject of the Email message. (Optional)
message | The body of the Email message. (Optional)
addsig | If 'checked', a signature will be sent. (Optional)
send_autocc | If 'checked', a copy will be sent to self. (Optional)
copyself | If 'checked', a copy will be saved in the sent folder. (Optional)
priority | This is the text priority level of the Email. (Optional)
content-type | This is the content-type of this message. (Optional)
no_send | Saves the variables to the user.dat file but does not perform the send. | (send.tpl)
Input Variables:
utoken | The user's utoken.
addsig | If 'checked', a signature will be sent. (Optional)
send_autocc | If 'checked', a copy will be sent to self. (Optional)
copyself | If 'checked', a copy will be saved in the sent folder. (Optional)
setview* | This changes how the messages are viewed in item.tpl. | (item.tpl)
Input Variables:
utoken | The user's utoken.
v_raw | When set, this shows the message as on the mail server. This overrides the other v_* settings. (Optional)
v_headers | This displays the headers of the Email message. (Optional)
v_font | This displays the message using variable width font. (Optional)
v_inline | This will display html, text and images inline of the Email message. (Optional)
v_exec | This will stop the javascript, applets, forms and scripts from being removed. (Optional)
v_show_alt | This will show the alternative part of the Email message as well. (Optional)
Output Variables:
Save as the 'item' CGI command.
config | This displays the user's configuration screen (options page) | (config.tpl)
Input Variables:
utoken | The user's utoken.
saveconfig (all) saveconfig_details saveconfig_filter saveconfig_reject_list | This saves the user configuration. | (config.tpl or frame.tpl)
Input Variables:
utoken | The user's utoken.
_real_name | The name of the user. (Optional)
_max_message_display | The number of items to display on the list page. (Optional)
new_timezone | The timezone which the user desires to see the messages in. (Optional)
_selected_tpl | The template which is currently being used. (Optional)
_sound_file | The name of the sound file. (Optional)
host_name* host_user* host_pass* host_prefix* host_proifile* | This list of multiple hosts setup. (Optional) (Must have at least host_name0, host_user0) (saveconfig_details - save these)
r_header* r_contains* r_action* r_dstfld* r_addr* | These are the filtering rules. (Optional) (saveconfig_filter - save these)
reject | This is the list of Emails to reject. (Optional) (saveconfig_reject_list - save these)
change_pass | Displays the change password template. (POPPASSD needed) Outdated by NetAuth. | (ch_pass.tpl)
set_pass | Changes the user's password. (POPPASSD needed) Outdated by NetAuth. | (ok.tpl)
fet_add | Adds the fetch account. | (config.tpl)
Input Variables:
utoken | The user's utoken.
fet_host fet_user fet_pass fet_number | The details of the fetch account. Fetch accounts are accounts that are seen as part of the INBOX.
fet_delete | Delete the selected fetch account. | (config.tpl)
Input Variables:
utoken | The user's utoken.
fet_host fet_user | The details of the fetch account to be removed.
fld_manage | This displays the folder management page. | (folders.tpl)
Input Variables:
utoken | The user's utoken.
Output Variables:
fld_inbox_total | The total size of INBOX.
fld_kinbox_total | The total size of INBOX in kbytes
fld_isize_total | The total size of all folders less INBOX.
fld_kisize_total | The total size of all folders less INBOX in Kbytes
fld_create | This creates a new folder. | (folders.tpl)
Input Variables:
utoken | The user's utoken.
fld_name | The name of the folder to be created.
Output Variables:
fld_inbox_total | The total size of INBOX.
fld_kinbox_total | The total size of INBOX in Kbytes
fld_isize_total | The total size of all folders less INBOX.
fld_kisize_total | The total size of all folders less INBOX in Kbytes
fld_delete | This deletes the selected folder. | (folders.tpl)
Input Variables:
utoken | The user's utoken.
dstfld | The name of the folder to be deleted.
Output Variables:
fld_inbox_total | The total size of INBOX.
fld_kinbox_total | The total size of INBOX in Kbytes
fld_isize_total | The total size of all folders less INBOX.
fld_kisize_total | The total size of all folders less INBOX in Kbytes.
fld_rename | This renames a selected folder. (dstfld,fld_name) | (folders.tpl)
Input Variables:
utoken | The user's utoken.
dstfld | The name of the folder to be renamed.
fld_name | The new name of the folder.
Output Variables:
fld_inbox_total | The total size of INBOX.
fld_kinbox_total | The total size of INBOX in Kbytes
fld_isize_total | The total size of all folders less INBOX.
fld_kisize_total | The total size of all folders less INBOX in Kbytes
pick_edit | This displays the pick.tpl, and has the pick list(recent addresses), distribution list and address book displayed. | (pick.tpl)
Input Variables:
utoken | The user's utoken.
Output Variables:
autoadd | This is the setting which determines whether additions to the pick list are done automatically.
picklist | The list of recently seen/used addresses.
dist_list | The distribution list.
abook_edit | The currently selected address book.
gaddr_books | The list of global address books which the user makes use of.
addr_books | The list of available address books.
abook | The list of available address books.
pick_save | This will save the changes to the pick list. | (pick.tpl)
Input Variables:
utoken | The user's utoken.
autoadd | This is the setting which determines whether additions to the pick list are done automatically.
picklist | The list of recently seen/used addresses.
dist_list | The distribution list.
addr_only | This will display the 'bookonly.tpl' | (bookonly.tpl)
Input Variables:
utoken | The user's utoken.
abook_edit | The name of the current selected address book.
nick_name | The nickname of the selected record. (Optional)
addr_pos | The position of the first address to start displaying. (optional)
letter_pos | The starting letter of the first address to start displaying. (optional)
~max_wml_display ~_max_message_display | The number of messages to be displayed per page.
Output Variables:
gaddr_books | The list of global address books that the user makes use of.
addr_books | The list of available address books.
abook | The list of available address books.
nick_name abk_* | The nickname of the selected record. This also sends out the rest of the address information for this nick_name.
book_prev | The start number of the previous page.
book_next | The start number of the next page.
name | This variable will create a link to the page used to edit the nickname of the selected record.
script_nick | This variable will create a javascript link to add the nickname to the selected to/cc/BCC field on the send page. (requires the javascript function "pressnick(value)" from the default templates.
create_addr | This will open an Address Book or create an address book. | (addrbook.tpl)
Input Variables:
utoken | The user's utoken.
abook_edit | The name of the current selected address book.
nick_name | The nickname of the selected record. (Optional)
Output Variables:
gaddr_books | The list of global address books which the user makes use of.
addr_books | The list of available address books.
abook | The list of available address books.
nick_name abk_* | The nickname of the selected record. This also sends out the rest of the address information for this nick_name.
Name | This variable will create a link to the page used to edit the nickname of the selected record.
compress_addr | This compresses an address book. This is done automatically by the CGI but is available for the user to compress if necessary. | (addrbook.tpl)
Input Variables:
utoken | The user's utoken.
abook_edit | The name of the current selected address book.
Output Variables:
gaddr_books | The list of global address books that the user makes use of.
addr_books | The list of available address books.
abook | The list of available address books.
nick_name abk_* | The nickname of the selected record. This also sends out the rest of the address information for this nick_name.
Name | This variable will create a link to the page used to edit the nickname of the selected record.
add_addr | This will add an address book entry to the address book. | (addrbook.tpl)
Input Variables:
utoken | The user's utoken.
abook_edit | The name of the current selected address book.
nick_name abk_* | The nickname of the selected record. This also sends out the rest of the address information for this nick_name.
Output Variables:
gaddr_books | The list of global address books which the user makes use of.
addr_books | The list of available address books.
abook | The list of available address books.
nick_name abk_* | The nick_name of the selected record. This also sends out the rest of the address information for this nick_name.
Name | This variable will create a link to the page used to edit the nickname of the selected record.
del_addr | This will remove an entry from the address book. | (addrbook.tpl)
Input Variables:
utoken | The user's utoken.
abook_edit | The name of the currently selected address book.
nick_name | The nickname of the selected record.
Output Variables:
gaddr_books | The list of global address books that the user makes use of.
addr_books | The list of available address books.
abook | The list of available address books.
nick_name abk_* | The nickname of the selected record. Also sends out the rest of the address information for this nick_name.
Name | This variable will create a link to the page used to edit the nickname of the selected record.
del_abook | This will delete an entire address book. | (addrbook.tpl)
Input Variables:
utoken | The user's utoken.
abook_edit | The name of the current selected address book.
Output Variables:
gaddr_books | The list of global address books which the user makes use of.
addr_books | The list of available address books.
abook | The list of available address books.
edit_abook | This displays the page where an address book can be edited. | (addrbook.tpl)
Input Variables:
utoken | The user's utoken.
abook_edit | The name of the currently selected address book.
Output Variables:
gaddr_books | The list of global address books that the user makes use of.
addr_books | The list of available address books.
abook | The list of available address books.
empty | This will empty the trash from a trash can or selected folder. | (list.tpl)
Input Variables:
utoken | The user's utoken.
switch | This will change the folder to display in the list.tpl. | (list.tpl)
Input Variables:
utoken | The user's utoken.
dstfld | The folder to display. (Optional: defaults INBOX)
Output Variables:
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
help | This will display the help.tpl. | (help.tpl)
show | This is a NULL command which can be used in conjunction with the 'page' command. | (uses page setting)
Input Variables:
utoken | The user's utoken.
page | The name of the template which is to be displayed. (Optional)
edit_dict | This will display the list of words in your private dictionary. | (sp_dic.tpl)
Input Variables:
utoken | The user's utoken.
Output Variables:
dict_edit | The list of words in the user's personal dictionary.
save_dict | This will save the private dictionary. | (sp_show.tpl)
Input Variables:
utoken | The user's utoken.
dict_edit | The list of words in the user's personal dictionary.
add_dict | This will add a word to the private dictionary. | (sp_show.tpl)
Input Variables:
utoken | The user's utoken.
misspelt_word | a word which is spelt wrong.
Output Variables:
The same as the CGI command spell_check
check_word | This will check one word for spelling. | (sp_fix.tpl)
Input Variables:
utoken | The user's utoken.
word | The word that is spelt wrong.
line | The line number in which the word is spelt wrong.
nword | The word number in the line in which the word is spelt wrong.
Output Variables:
spell_alt | The list of possible correct spellings.
spell_check | This will check a message for spelling. | (sp_show.tpl)
Input Variables:
utoken | The user's utoken.
message | The message which is to be spellchecked.
to | The list of people that the message should be sent to. (optional)
cc | The list of people that a carbon copy should be sent to. (Optional)
BCC | The list of people that a blind carbon copy should be sent to. (Optional)
attach | The list of attached files. (Optional)
reply | The reply-to field of the Email message. (Optional)
subject | The subject of the Email message. (Optional)
addsig | If 'checked', a signature will be sent. (Optional)
send_autocc | If 'checked', a copy to self will be sent. (Optional)
copyself | If 'checked', a copy will be saved in the sent folder. (Optional)
priority | This is the text priority level of the Email. (Optional)
content-type | This is the content-type of this message. (Optional)
Output Variables:
lines_wrong | The number of lines in which spelling mistakes occur.
nlines | The total number of lines in the Email.
nwords | The number of words that were checked.
nwrong | The number of words that are spelt wrong.
message | The message which is to be spell checked.
to | The list of people that the message should be sent to.
CC | The list of people that a carbon copy should be sent to.
BCC | The list of people that a blind carbon copy should be sent to.
Attach | The list of attached files.
reply | The reply-to field of the Email message.
subject | The subject of the Email message.
addsig | If 'checked', a signature will be sent.
send_autocc | If 'checked', a copy will be sent to self.
copyself | If 'checked', a copy will be saved in the sent folder.
priority | This is the text priority level of the Email.
content-type | This is the content-type of this message.
change_word | This will change a word. | (sp_show.tpl)
Input Variables:
utoken | The user's utoken.
misspelt_word | This is the word which is spelt wrong.
misspelt_line | This is the line number in which the word is spelt wrong.
word_number | This is the place in the line where the word is spelt wrong.
corrected_word | This is the newly corrected word
Output Variables:
These are the same as the CGI command spell_check
rebuild_indexes | This re-creates the indexes of the messages. | (list.tpl)
Input Variables:
utoken | The user's utoken.
bulletin | This will display the list of Bulletins that are available to view. | (bulletin.tpl)
Input Variables:
utoken | The user's utoken.
Output Variables:
folder | The value is 'bulletin_fld', used for viewing bulletin messages
new_bulletin | This is used to create a new bulletin. The user must be allowed to create new bulletins in order for this to work. | (send_bull.tpl)
Input Variables:
utoken | The user's utoken.
send_bulletin | Sends the bulletin. | (ok.tpl)
Input Variables:
utoken | The user's utoken.
valid_users | The list of users who will get a particular bulletin. (Optional: defaults to all)
valid_day valid_month valid_year | The date on which the bulletin will timeout, and stop being displayed.
to | The list of people that the message will be sent to.
CC | The list of people that a carbon copy will be sent to. (Optional)
BCC | The list of people that a blind carbon copy will be sent to. (Optional)
attach | The list of attached files. (Optional)
reply | The reply-to field of the Email message. (Optional)
subject | The subject of the Email message. (Optional)
message | The body of the Email message. (Optional)
addsig | If 'checked', a signature will be sent. (Optional)
send_autocc | If 'checked', a copy to self will be sent. (Optional)
copyself | If 'checked', a copy will be saved in the sent folder. (Optional)
priority | This is the text priority level of the Email. (Optional)
content-type | This is the content-type of this message. (Optional)
todo | This displays the 'to do' list. | (todo.tpl)
Input Variables:
utoken | The user's utoken.
Output Variables:
todo_day todo_month todo_year | The day/month/year of today's date.
today_date | Today's date.
todo_add | This adds a 'to do' item to the list. | (todo.tpl)
Input Variables:
utoken | The user's utoken.
todo_day todo_month todo_year | This is the word which is spelt wrong.
line | This is the line number in which the word is spelt wrong.
nword | This is the word number in the line in which the word is spelt wrong.
Output Variables:
spell_alt | This is the list of possible correct spellings.
todo_delete* | Deletes a selected todo. | (todo.tpl)
Input Variables:
utoken | This is the user's utoken.
profile | Displays the profiles list. | (config.tpl)
Input Variables:
utoken | This is the user's utoken.
Output Variables:
_default_profile | This is the current selected profile.
profile_name | This is the current viewed profile.
pro_* | This is the list of variables which are stored in the profile. The default template set has 'pro_sig' which is the user's signature.
profile_add | Adds the profile to the list. | (config.tpl)
Input Variables:
utoken | This is the user's utoken.
profile_name | This is the current viewed profile.
pro_* | This is the list of variables which are stored in the profile. The default template set has 'pro_sig' which is the user's signature.
profile_delete* | Deletes the selected profile. | (config.tpl)
Input Variables:
utoken | This is the user's utoken.
Output Variables:
book_allow_edit | This is setup if the selected book is allowed to be changed.
ext_addr | Displays the external address book. | (external.tpl)
Input Variables:
utoken | This is the user's utoken.
ext_search | Searches the external address book. | (external.tpl)
Input Variables:
book_selected | This is the external address book which has been selected.
ext_* | These are the search strings for each search field allowed.
ext_match | When set to 'true', all search fields have to be matched in order to get a search match.
send_confirm* | Sends a confirm message to this selected Email. | (confirm.tpl)
Input Variables:
utoken | This is the user's utoken.
config.msg | The body of the confirm Email message that will be sent.
subject | The subject of the confirm Email message. (Optional)
cmd=test | There are no other parameters, this does a basic test in order to try and locate some common problems. | (internal)
remove_setting=_xxx | This will remove the named setting from the user's user.dat file (must be a setting beginning with a '_'. can be used as a comma separated list (eg. remove_setting=_sound_file,_real_name) | (selected page)
page=xxx.tpl | This will allow the administrator to select any template page and display it. This includes any new templates which are desired. | (selected page)
process=cmd | This will allow the CGI to process another command directly after the main command. (ie cmd=xxx, or button pressed, etc.) This will only get processed if no error occurs. | (command page)
on_error=cmd | This will allow the CGI to process another command directly after the main command if the main command generates an error. ie. ?cmd=login&user=username&pass=password &on_error=url&link=http://netwinsite.com&utoken=... This can also be used in conjunction with process. In this case, if either the main command or the 'process' command generates an error this command is processed. | (command page)
force_connection=true | This will force the CGI to set up the network connection to the mail server. | (selected page)
require_lock=true | This will force the CGI to use the file locking routines rather than have the CGI determine whether it should use file locking depending on the command. | (Selected page)
do_admin_fn=true | This will force the CGI to process the auto-delete/auto-logout functions that generally only occur every hour. | (Selected page)
disable_internal_connection=true | Disables 'non-essential' internal connections set up by WebMail | (selected page)
Any of the above commands which have an '*' next to them must be after a number, where this number is normally the message unique ID. The number appears directly after the cmd name. eg. Cmd=item-1, cmd=item-32, cmd=itempart-5 In most cases, the CGI will automatically take care of building links that require this sort of ID as well. The variables which are displayed in brackets are also required in order to ensure the function behaves correctly. eg. Cmd=list&fld=INBOX cmd=moveitem-32&dstfld=New_Box Every command, with the exception of the register, manager and login commands, require the utoken to be present. If an error such as 'Incorrect utoken' appears, you should ensure that a user token is being passed, either as a hidden field or as part of a query.

|  | Template Commands

Throughout the templates you will see '||commands||'. These are what the CGI will pick up and replace with data. Some commands set up variables and are only available on one page. Other variables are available on all templates. There are also conditional statements and functions available. The following tables show all of the available '||commands||'. In the tables, some commands have extra fields, in which case the name of the field will show one of the following: 'var' - a variable name. 'value' - either a variable or text. 'text' - just text. The below template commands are available on every template: Table of Contents Conditional Statements Template Commands Extended Template Commands Begin....End Commands Tables
Conditional Statements The below conditional statements are available on every template. ||ifndef||sound|| ....Show Picture instead... ||else|| ||ifequal||sound||loud|| ...play loud sound file... ||else|| ||ifequal||sound||normal|| Play sound file... ||endif|| ||endif|| ||endif||
||ifdef||var|| | Conditional inclusion if variable is defined.
||ifndef||var|| | Conditional inclusion if variable is not defined.
||ifinstr||value1||value2|| | Conditional inclusion if template variable value1 contains string value2, case sensitive.
||iflower||value1||value2|| | This will return to true if 'value1' is lower than 'value2'.
||ifequal||value1||value2|| | Conditional inclusion if template value1 equals value2, case insensitive.
||ifnequal||value1||value2|| | Conditional inclusion if template value1 not equals value2, case insensitive.
||ifgreater||value1||value2|| | This will return to true if 'value1' is greater than 'value2'.
||else|| | Optional ||else|| section to go with any of the ||if...|| conditions.
||endif|| | Marks end of any ||if...|| or ||else|| section. Must have an ||endif|| for every ||if...||.
Template Commands
||define||var||value|| | This will create a variable with the stated value.
||undef||var|| | This will undefine a variable.
||include||template|| | This reads the named file, which may include template variables. ie. ||include||menubar.tpl||
||do(....)|| | This is used to run other command line scripts, including CGI's, scripts and other compiled code. NOTE: This will remove the 'Content-Type:' of other CGI's. Variables may also be used as a parameter. ie. ||do(program.cgi ||current_user|| ||current_host||)|| NOTE: This requires the "do_base_dir" ini setting to be used.
||build(...)|| | This allows the building of variables from variables in order to display their value. ||define||first||nw|| ||define||second||img|| ||build(||first||||second||)|| or ||build(NW||second||)|| The above will display the value for the variable 'nwimg' if one is available.
||lang||var|| | This takes a variable and translates the value using the language file. ie. ||Define||test||welcome|| ||Lang||test||
||lang_str||text|| | This takes text and translates it using the language file. ie. ||lang_str||INBOX||
||chop||var||n|| | This performs a chop of the variable's value, where it only displays n number of characters.
||lchop||var||n|| | This will chop the variable to the size provided, chopping at whole word intervals, and adding on '...' if chopped.
||chop_str||text||n|| | This performs a chop of the text or the name of the variable, where it only displays n number of characters.
||lchop_str||text||n|| | This will chop the text to the size provided, chopping at whole word intervals, and adding on '...' if chopped.
||is_checked||var|| | This will replace with 'checked' if the value of the variable is on, true, checked or a non zero number.
||java_text||var|| | This will convert the variable to use '_' for the following characters so that you can use the value as a javascript variable. '(space)', '+', '<', '>', '&', ':'
||href_text||var|| | This will convert the variable to use '%xx' for the following characters when using javascript and href's: '(space)', '+', '<', '>', '&', ':' This will only encode the first 1024 characters. This is acceptable in most cases as most browsers have a limit near list on all queries (href's).
||html_text||var|| | This will convert the variable into displayable HTML characters. This ensures that it will not be treated as an actual HTML. It converts the following characters: '"', '<', '>', '&', '\n', '\r' also language support etc.
||html_line||var|| | This works as above, but will not remove the '\n' and '\r's.
||wml_text||var|| | This will convert the variable so that it displays correctly in WML.
||wml_line||var|| | This works as above, except that it will not remove '\n' and '\R's
||wml_line||text|| | This will convert the text so that it displays correctly in WML.
||wml_br_text||var|| | This works the same as the variable 'wml_text', except that this variable might have WML code and so is left alone.
||wml_br_line||var|| | This works as above, except that it will not remove '\n' and '\R's
||wml_str||text|| | This will convert the text so that it displays correctly in WML.
||date_today||value|| | This displays today's date in the specified layout, or using the variable provided. ie. ||date_today||date_layout||
||add||var1||var2|| | Adds 2 integers and displays the result.
||sub||var1||var2|| | Subtracts the integer var2 from integer var1 and displays the result.
||remove_email||var1||var2|| | Template function, used to remove a particular email address out of a list. Used: ||remove_email||list_of_emails||email_to_remove||
||just_include||varaible|| | Like the ||include|| template function however, using this command the file will not be phased through the template phaser, it will be displayed as is.
Extended Template Commands The below template commands are available on every template.
||/*||...||*/|| | Anything between these tags will not be passed out to the web server. This is so that internal comments can be setup that the user cannot see.
||show_email|| | This will show the selected Email that is setup when calling the item* command.
||ext_display||value1|| | This command takes the variable and encodes it to ensure that it can be correctly sent. This is used for the global external address book.
||folder|| | This is the unchanged folder name with spaces.
||fld|| | This is the folder name, encoded to ensure that there are no spaces.
||last_page|| ||_current_page|| | These are setup with the template name so that you can tell what this template is named as well as the last template that was sent out.
||hostlist|| | This is setup to display the list of available hosts. To have this available on a template you must also send: force_connection=true Layout: <option value=0>||hostlist||</option>
||fldlist|| ||xfldlist|| | This is set up to display the list of available folders. To have this available on a template you must also send: force_connection=true The xfldlist doesn't include the INBOX folder.
||included_file|| | Used to indicate how many includes the current point is deep. e.g. displayed template=0, file(s) included in that template=1, file(s) included in any of the originally included file(s)=2, etc, up to a maximum of 5.
||current_user|| ||current_host|| ||current_port|| | This is the information about the user, and which host they are connected to.
||folder_stats||label|| | This generates the folder stats for the value of the label provided.
Output Variables:
fld_msg | This is the number of messages in the folder.
fld_size/fld_ksize | This is the size of all the messages in the folder.
fld_draft | This is the number of draft messages.
fld_delete | This is the number of messages which are marked to be deleted.
fld_unseen | This is the number of messages which have been read.
fld_seen | This is the number of unread messages.
fld_flagged | This is the number of messages that have been flagged.
fld_reply | This is the number of messages that have been replied to.
||length||var|| | This returns the length of the variable's value.
||force_sort||value|| | This forces the sorting of the list of Emails. ||force_sort||new|| ||force_sort||normal||
||cvt_date||var1||var2|| | This will convert the date field 'var1' to the layout of 'var2'. ie. ||cvt_date||h_date||date_layout||
||divide||lot||var|| | This will take the variable value (var) and convert it into separate images for each letter, using the 'lot' as part of the src="...". ie. ||divide||(||nwimg||/fonts/russian_)||h_subject|| builds: <img border="0" src="||nwimg||/fonts/russian_xxx.gif"> where the 'xxx' is the decimal number of the character. ' ' = 032...etc. When used in conjunction with '||email_charset||' to select which character sets to display, you can set up the page to display in one character set but display other selected character sets using images NOTE: This will not work correctly with characters sets that use wide characters.
||disk_quota|| | The user's disk quota when using POP in bytes.
||kdisk_quota|| | The user's disk quota when using POP on kilobytes.
||pop_size|| | The amount of disk quota that has been used by a user, in bytes.
||kpop_size|| | The amount of disk quota that has been used by a user, in kilobytes.
||version|| | The version number, eg: "v3.0c"
||product|| | The product name ("WebMail")
||number_fetch|| | The number of fetch accounts setup
||env||value|| | This returns the environment variable of the value
Begin...End Commands Most of the following commands require some variables to be setup in order for them to be used correctly. All 'begin...end' commands set up various variables inside them, and normally generate multiple results. The main example is the list begin..end command, where it is displayed for every message on the page. Any variable in the input list that starts with a '~' is an ini setting.
||begin_flag||...||end_flag|| | This is used to display the extended flags of emails.
Input Variables:
email_extra_flags | Thisis the list of extra flags available. (Setup by 'begin_list')
Output Variables:
flag_name | The name of the flag (ie flag_test)
flag_short_name | The sorten name of the flag (ie test)
flag_value | The value of the flag
||begin_list||...||end_list|| | This lists each Email in the selected folder.
Input Variables:
fld/folder | This is the folder that is selected to display
max_line_count | This is used to setup the available range for the 'line' variable, and to allow highlighting of every other line. (Optional)
_max_message_display ~max_wml_display | This is used to determine how many messages are displayed per page, in HTML or WML mode. (Optional)
pos | This is the starting position of the first Email. It is the actual Email number, not the page number. (Optional)
force_connection=true | This setting is needed to be passed to the CGI if the command is not 'list', 'mail_check', 'mail_reload' and 'fld_manage'.
Output Variables:
email_charset | This is setup with the character set that the Email states. This can then be used to inform the browser what character set to use. ||ifdef||email_charset|| <meta http-equiv="Content-type" content="text/html; charset=||email_charset||"> ||endif||
line | This is setup to go from 0 to 'max_line_count'-1 in values, and to determine how the row is to be highlighted.
msg_no | The message number.
h_uidl/uidl | The UIDL of the Email message.
fet_user* fet_host* fet_port* fet_number* | These are only setup if the user has muti-fetch setup, in which case the values are setup depending on the username, host, port, and what number was setup. Normally the number is used to determine which image to display.
h_isread h_isreplied h_isflagged h_isdeleted h_isdraft h_isunseen h_isremote h_isattached | These are the different flag settings for Email messages. The values of these are '1' or '0', where a '1' indicates that it is active. ie. For 'h_isread', being set to '1' indicates that it has been read.
h_attach | This is the number of attachments that the Email has. On a POP server this is either '0' or '1+'.
h_lines h_bytes/h_kbytes | This is the number of lines, or the size of the Email message. (Not the size of the attachments)
h_to h_cc | This is the list of Email addresses that were sent with this Email message. Note: BCC field is not available.
h_from h_from_email h_from_personal h_reply h_reply_email h_reply_personal | This indicates who the Email came from and who to reply to. This is where you can indicate whether the address should appear in personal, Email or complete mode. ie. Complete: "Lynden" <lynden@1.2.3.4> Email: lynden@1.2.3.4 Personal: "Lynden"
h_subject | This is the subject of the Email.
h_date h_local_date h_date_day h_date_time | This is the date on which the Email was sent. There are various ways to display the date. The last three are all displayed in the timezone setup by the user or administration.
h_pri | This is the priority of the Email. This defaults to 'Normal' if not defined.
b_item b_forward b_forward_edit b_save b_reply b_replyall b_list delitem b_prev/msg_prev b_next/msg_next | These variables are the links to process the stated action. ie. b_forward_edit - is the complete URL to forward_edit the item.
Variables Available after Command:
list_email_charset | This is set to the character set that should be used to display the list correctly. This can then be used to inform the browser what character set to use. ||ifdef||email_charset|| <meta http-equiv="Content-type" content="text/html; charset=||email_charset||"> ||endif||
||begin_new||...||begin_new|| | This lists each Email in the selected folder that is marked as new.
Input Variables:
This 'begin...end' command has the same input variables as the '||begin_list||...||end_list||' command.
Output Variables:
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
||begin_list_all||...||end_list_all|| | This is used to display the complete list of Email messages.
Input Variables:
This 'begin...end' command has the same input variables as the '||begin_list||...||end_list||' command.
Output Variables:
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
||begin_rules||...||end_rules|| | These are the Email filter rules.
Output Variables:
n | The rule number.
r_headers | The headers with the selected header.
r_contains | The string to be searched for.
r_actions | The selected action.
r_addr | The Email address which should be used, if needed.
r_iscase | This determines whether to use the case dependence
xfldlist | The folder to move/copy items into, if needed.
||begin_address||...||end_address|| | This lists the items in the selected address book.
Input Variables:
abook_edit | The selected address book
Output Variables:
nick_name | This is the link used to display/edit the data item .
script_nick | This is used to call the javascript: pressnick('nick_name') which is used on the popup address book
name | This is just the nickname.
abk_* | These are all the rest of the address book fields that have been added. The administration sets these up to be any number. ie. abk_email
||begin_addr_list||...||end_addr_list|| | This lists the items in the selected address book.
Input Variables:
abook_edit | The selected address book
addr_pos | The starting position.
max_wml_display _max_message_display | This is used to determine how many messages to display on a page.
Output Variables:
nick_name | This is the link used to display/edit the data item.
script_nick | This is used to call the javascript: pressnick('nick_name') which is used on the popup address book
name | This is just the nickname.
abk_* | These are all the rest of the address book fields that have been added. The administration sets these up to be any number. ie. abk_email
||begin_fld_short||...||end_fld_short|| | This generates a list of the folders that are available quickly. Excluding the INBOX.
Input Variables:
new_mail_name | The name of the INBOX.
inbox_folder | The starting position.
default_folders_first | Weither the default folders are first
user_trash_can | The name of the trash can.
disallow_folders | The folders not to display.
fixed_folders | The list of fixed folders.
remove_fixed_folders | To remove all fixed folders from list.
Output Variables:
fixed | Weither the folder is a fixed folder
fld_name fld_name_short folder_name | The name of the folder. 'folder_name' is already href encoded.
fld_is_public | If the folder is a public folder
fld_no_select | If the folder is not allowed to be selected
fld_prefix_name fld_sub_count | This is used to display the folders into sub folders.
||begin_xfld_short||...||end_xfld_short|| | This generates a list of the folders that are available quickly. Including the INBOX.
Input Variables:
This 'begin...end' command has the same input variables as the '||begin_fld_short||...||end_fld_short||' command.
Output Variables:
This 'begin...end' command has the same output variables as the '||begin_fld_short||...||end_fld_short||' command.
||begin_folder||...||end_folder|| | This lists the available folders.
Input Variables:
~new_mail_name | This determines what the INBOX should display as. (Optional)
~disallow_folders | This determines which folders are not allowed. (Optional)
~fixed_folders | This determines which folders the users are not allowed to edit. (Optional)
force_connection=true | This setting is needed to be passed to the CGI if the command is not 'list', 'mail_check', 'mail_reload' and 'fld_manage'.
Output Variables:
fld_name | This is the folder's name.
folder_name | This is the folder's name encoded without any spaces. Needed for javascripts or href's
fld_msg | This is the number of messages in the folder.
fld_size/fld_ksize | This is the size of all the messages in the folder.
fld_draft | This is the number of draft messages.
fld_delete | This is the number of messages which are marked to be deleted.
fld_unseen | This is the number of messages which have been read.
fld_seen | This is the number of unread messages.
fld_flagged | This is the number of messages that have been flagged.
fld_reply | This is the number of messages that have been replied to.
fld_fetch | Set to true when INBOX folder is being displayed.
Variables Available after Command:
fld_count | The number of folders.
fld_msg_total | The total number of folders.
fld_size_total fld_ksize_total | The total size of all the folders.
fld_draft_total | The total number of draft messages
fld_delete_total | The total number of messages marked to be deleted .
fld_seen_total | The total number of read messages.
fld_unseen_total | The total number of unread messages.
fld_reply_total | The total number of messages which have been replied to.
fld_tsize_total fld_ktsize_total | The total size of all messages which are not in the trash folder.
fld_trash_total fld_ktrash_total | The size of the Trash folder.
fld_fetch_msg | The number of Emails in the fetch accounts.
fld_fetch_size | The size of all the mail in bytes in the fetch accounts.
fld_fetch_ksize | The size in Kbytes
fld_fetch_draft | The number of draft messages in fetch accounts.
fld_fetch_delete | The number of marked to be deleted messages in fetch accounts.
fld_fetch_seen | The number of seen messages in fetch accounts.
fld_fetch_unseen | The number of unseen messages in fetch accounts.
fld_fetch_flagged | The number of flagged messages in fetch accounts.
fld_fetch_reply | The number of replied messages in fetch accounts.
||begin_fld_list||...||end_fld_list|| | This lists the available folders, only displaying a limited number per page.
Input Variables:
~new_mail_name | This determines what the INBOX should display as. (Optional)
~disallow_folders | This determines which folders are not allowed. (Optional)
~fixed_folders | This determines which folders the users are not allowed to edit. (Optional)
force_connection=true | This setting is needed to be passed to the CGI if the command is not 'list', 'mail_check', 'mail_reload' and 'fld_manage'.
Output Variables:
fld_name | This is the folder's name.
folder_name | This is the folder's name encoded without any spaces. Needed for javascripts or href's
fld_msg | This is the number of messages in the folder.
fld_size/fld_ksize | This is the size of all the messages in the folder.
fld_draft | This is the number of draft messages.
fld_delete | This is the number of messages which are marked to be deleted.
fld_unseen | This is the number of messages which have been read.
fld_seen | This is the number of unread messages.
fld_flagged | This is the number of messages that have been flagged.
fld_reply | This is the number of messages that have been replied to.
fld_fetch | Set to true when INBOX folder is being displayed.
Variables Available after Command:
fld_count | The number of folders.
fld_msg_total | The total number of folders.
fld_size_total fld_ksize_total | The total size of all the folders.
fld_draft_total | The total number of draft messages
fld_delete_total | The total number of messages marked to be deleted .
fld_seen_total | The total number of read messages.
fld_unseen_total | The total number of unread messages.
fld_reply_total | The total number of messages which have been replied to.
fld_tsize_total fld_ktsize_total | The total size of all messages which are not in the trash folder.
fld_trash_total fld_ktrash_total | The size of the Trash folder.
fld_fetch_msg | The number of Emails in the fetch accounts.
fld_fetch_size | The size of all the mail in bytes in the fetch accounts.
fld_fetch_ksize | The size in Kbytes
fld_fetch_draft | The number of draft messages in fetch accounts.
fld_fetch_delete | The number of marked to be deleted messages in fetch accounts.
fld_fetch_seen | The number of seen messages in fetch accounts.
fld_fetch_unseen | The number of unseen messages in fetch accounts.
fld_fetch_flagged | The number of flagged messages in fetch accounts.
fld_fetch_reply | The number of replied messages in fetch accounts.
||begin_bulletin||...||end_bulletin|| | This lists the available address books.
Input Variables:
~bulletin_path | This is where the bulletins are stored. This MUST be setup.
max_line_count | This is used to setup the available range for the 'line' variable. This is used to allow highlighting of every other line. (Optional)
Output Variables:
new_bulletin | This is set to 'yes' if the bulletin is new to the user.
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
||begin_forward||...||end_forward|| | This lists the Emails that will be forwarded.
Input Variables:
fwd_list | This is the list of UIDL's of the Emails which will be forwarded.
Folder | This is the folder to which the Items will be forwarded.
Output Variables:
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
||begin_users||...||end_users|| | This lists the result of the search for users. (Used only on manager's page)
Input Variables:
wild_search | The wild search string.
Output Variables:
user | The user's complete user directory.
user_name | The user's username.
user_host | The user's host name.
hash_type | The hashing method which is being used. (1 or 2)
||begin_pages||...||end_pages|| | This generates the list of page numbers.
Input Variables:
num_pages | The number of pages.
_max_message_display ~max_wml_display | The number of items per page.
Output Variables:
npage | The page number.
pagepos | The position of the page number using the number of items per page.
pagestart | The position of the start of this page. (ie pagepos)
pagefinsih | The position of the end of this page.
||begin_xpages||x||...||end_xpages|| | This generates the list of page numbers and displays no more than x at any one time.
Input Variables:
num_pos | The current page number
num_pages | The number of pages.
_max_message_display ~max_wml_display | The number of items per page.
Output Variables:
npage | The page number.
pagepos | The position of the page number using the number of items per page.
||begin_todo||...||end_todo|| | This lists the items on your 'to do' list.
Input Variables:
~timezone | The timezone which the times will display in.
Output Variables:
tdl_name | The name/header of the 'to do' list.
tdl_* | The list of administration settings. ie. tdl_data
tdl_old | This is set to 'true' if the item is old.
tdl_today | This is set to 'true' if the item is from today.
tdl_date | The date which the 'to do' list has been set to.
tdl_std_date | The date at GMT time.
||begin_profile||...||end_profile|| | Lists the user's profiles.
Output Variables:
profile_name | This is the name of the profile.
pro_* | This is the list of administration settings. ie. pro_sig
||begin_tpl||...||end_tpl|| | This lists the available templates.
Input Variables:
~tpl_set | This ini setting lists each template set available to the user.
Output Variables:
tpl_number | The template number.
tpl_path | The path to the template.
tpl_text | The name of the template set.
||begin_search||...||end_search|| | This command displays the results of your Email search.
Input Variables:
max_line_count | This is used to setup the available range for the 'line' variable. This is used to allow highlighting of every other line. (Optional)
search_mode | When set, the search mode is OR.
search_from | The 'from' seach string.
search_subject | The 'subject' search string.
search_body | The 'body' search string.
search_body_size | The maximum number of characters in the body which the search command will check against.
multi_sel_fld | The list of folders which the search function will look in.
force_connection=true | This setting is needed to be passed to the CGI if the command is not 'list', 'mail_check', 'mail_reload' and 'fld_manage'.
Output Variables:
h_search_from | The converted search string.
h_search_subject | The converted search string.
h_search_body | The converted search string.
h_folder | The folder where the Email message is located.
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
||begin_search_list||...||end_search_list|| | This command displays the results of your Email search.
Input Variables:
max_line_count | This is used to setup the available range for the 'line' variable. This is used to allow highlighting of every other line. (Optional)
search_mode | When set, the search mode is OR.
search_from | The 'from' seach string.
search_subject | The 'subject' search string.
search_body | The 'body' search string.
search_body_size | The maximum number of characters in the body which the search command will check against.
multi_sel_fld | The list of folders which the search function will look in.
force_connection=true | This setting is needed to be passed to the CGI if the command is not 'list', 'mail_check', 'mail_reload' and 'fld_manage'.
Output Variables:
h_search_from | The converted search string.
h_search_subject | The converted search string.
h_search_body | The converted search string.
h_folder | The folder where the Email message is located.
This 'begin...end' command has the same output variables as the '||begin_list||...||end_list||' command.
||begin_timezone||...||end_timezone|| | Lists the timezone settings which are available.
Input Variables:
~timezone | The timezone which the user has currently selected.
Output Variables:
tz | The timezone letters. (ie. nzst)
tz_name | The full timezone name. (ie New Zealand Standard)
tz_offset | The timezone offset. (ie +1200)
tz_selected | This is set if the timezone has been selected.
||begin_ext_book||...||end_ext_book|| | The list of global external address books.
Input Variables:
ext_books | This lists the available books, and is setup internally.
Output Variables:
book_name | The name of the book
book_text | The general text about the book.
book_edit | When set to 'true' the user can change the addresses in this address book.
||begin_ext_avail||...||end_ext_avail|| | The list of available variables to display.
Input Variables:
ext_available | The list of available fields. This is setup internally.
Output Variables:
field_name | The name of the field. (ie phone_number)
field_text | The name in general readable text. (ie Phone Number)
||begin_ext_search||...||begin_ext_search|| | The list of available fields which may be searched on.
Input Variables:
ext_search | The list of available search fields. This is setup internally.+++
Output Variables:
field_name | The name of the field. (ie phone_number)
field_text | The name in general readable text. (ie Phone Number)
field_type | The type of field. (string, number, date etc..)
||begin_ext_results||...||end_ext_results|| | The list of the results from the search.
Input Variables:
ext_results | The list of search results. This is setup internally.
Output Variables:
ext_result | The resulting line.
||begin_attach||...||end_attach|| | The list of attached files.
Output Variables:
attach_fname | The complete filename.
attach_name | The name of the file, excluding the extention.
attach_size/attach_ksize | The size of the file.
Variables Available after Command:
attach_total_size attach_total_ksize | The complete size of all files.
||begin_keep_attach||...||end_keep_attach|| | The list of files which are stored by the CGI.
Output Variables:
attach_fname | The complete filename.
attach_name | The name of the file, excluding the extention.
attach_size/attach_ksize | The size of the file.
Variables Available after Command:
attach_total_size attach_total_ksize | The complete size of all files.
||begin_pick||...||end_pick|| | The Emails which are in the pick list.
Input Variables:
pick_item | The list of available fields. This is setup internally.
Output Variables:
pick_name pick_email pick_personal | The Email of the pick item. This is where you can display whether the address appears in personal, Email or complete format. ie. Complete: "Lynden" <lynden@1.2.3.4> Email: lynden@1.2.3.4 Personal: "Lynden"
||begin_fet||...||end_fet|| | The list of all the multi-fetch accounts.
Input Variables:
host_fetch | The list of available fields. This is setup internally.
Output Variables:
fet_count | The count of the fetch.
fet_user | The username of the fetch account.
fet_host | The host of the fetch account.
fet_port | The port of the fetch account. (ie 110, 143)
fet_number | This is just an extra number that can be stored. Normally used to determine which image to display.
fet_active | This is set if the account is active.
||begin_sel||...||end_sel|| | Cycle though all the 'Sel_*' fields listing each one.
Input Variables:
sel_* | The list of selected boxes.
Output Variables:
sel | The name of the select.
||begin_host||...||end_host|| | The list all the current setup hosts lines.
Output Variables:
cur_num | The host number.
cur_host | The host name/IP.
cur_user | The username setup for this host.
cur_port | The port of the host account. (ie 110, 143)
cur_prefix | The IMAP prefix that will be used with this host.
cur_profile | The selected profile to be used with this host.
||begin_for||x||y||...||end_for|| | This cycles through starting at 'x' and finishing at 'y'.
Output Variables:
for | The count it is on.
||begin_email||email||...||end_email|| | This will break up the email list provided into seperate fields.
Input Variables:
email | A comma seperated email list to be broken up.
Output Variables:
num | Number.
email email_email email_personal | The full email address, just the email and just the personal details.
||begin_email||email||...||end_email|| | This will break up the email list provided into seperate fields.
Input Variables:
email | A comma seperated email list to be broken up.
Output Variables:
num | Number.
email email_email email_personal | The full email address, just the email and just the personal details.

|  | Multiple Template Setup

WebMail supports multiple template sets, allowing different styles or even different languages on the one site. Each template can have it's own template directory as well as it's own image location. In your ini file, add one line for each template set that you wish to have, in the following layout: tpl_set <number> <templates_dir> <nwimg> <name> The 'number' is the template number that is used to determine which template you are using, this should be unique. The 'templates_dir' is the full path to the template directory. The 'nwimg' is the web server relative path to the images. And 'name' is just text that is displayed to the user about the template set. Example: tpl_set 1 /var/spool/webmail/marble /nwimg/mail/marble Marble tpl_set 2 /var/spool/webmail/iconic /nwimg/mail/iconic Iconic tpl_set 3 /var/spool/webmail/globe /nwimg/mail/globe Globe The next step is changing the templates to allow allow the users to select which templates they want to use. Below are the template additions needed in order to allow the user to select which template to use. login.tpl ||ifdef||multiple_tpl|| <!--- If you wish multiple template sets to be user selected then remove the following ---> <!--- The users can then select their template sets on the configuration page. ---> <tr> <td align="right">Select Template Set:</td> <td> <select name="selected_tpl" size=1> <option value="">(Default)</option> ||begin_tpl|| <option value="||tpl_number||">||tpl_text||</option> ||end_tpl|| </select> </td> </tr> ||endif|| config.tpl ||ifdef||multiple_tpl|| <tr> <td align="right">Select Template Set:</td> <td> <select name="_selected_tpl" size=1> ||begin_tpl|| ||ifequal||_selected_tpl||tpl_number|| <option selected value="||tpl_number||">||tpl_text||</option> ||else|| <option value="||tpl_number||">||tpl_text||</option> ||endif|| ||end_tpl|| </select> </td> </tr> ||endif||