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

    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 in