It is possible to customize the look of email messages sent by the DV2000. This customization uses a set of files called Templates which it uses to format the email message. While these files can be modified by anybody using any standard text editor, it the doing so should be handled with caution.
The product ships with several default templates located in c:\vs\templates. These files will be copied to c:\vs\vmuser when they are first used. Files located in c:\vs\templates should not be modified.
All custom templates should be placed into c:\vs\vmuser. If a template file exists in the mailbox folder it will take precedence.
File names are formatted for specific uses. The format is defined as <USE><LANGUAGE>TEMPLATE.<FORMAT>.
Example:
VM101TEMPLATE.TXT
Field | Description |
---|---|
<USE> | Defines what the template should be used for. |
<LANGUAGE> | DV2000 language number the file is to be used for. |
<FORMAT> | TXT for text based and HTML for html based email messages. |
USE | PREFIX |
---|---|
E911 | Emergency Alert body template. |
E911S | Emergency Alert subject template. |
VM | Voice message body template. |
VMS | Voice message subject template. |
CD | Call data body template. |
CDS | Call data subject template. |
WU | Failed wakeup call body template. |
WUS | Failed wakeup call subject template. |
Used to specify the language the template is designed for. The language of the mailbox is used to determine this value. If the language of the mailbox does not exist, the system will use 101 (US English).
NUMBER | LANGUAGE |
---|---|
101 | US English |
102 | UK English |
201 | Spanish |
301 | Japanese |
401 | French, FR |
402 | French, CA |
501 | Portuguese, BR |
601 | German |
701 | Italian |
801 | Arabic |
901 | Chinese, Mandarin |
902 | Chinese, Cantonese |
1001 | Thai |
1101 | Swahili |
1201 | Korean |
1301 | Russian |
1401 | Turkish |
Files are technically simple text files containing specific keywords and loop modifiers. A template is loaded each time a message is processed.
The following table shows the keywords available, description of what it is used for and a sample output.
KEYWORD | DESCRIPTION | EXAMPLE |
---|---|---|
${first_name} | First name | John |
${from} | Who is the message from | John Smith |
${from_first} | First name of sender mailbox. | Jane |
${from_last} | Last name of sender mailbox. | Doe |
${from_mailbox} | Senders mailbox number. | 560 |
${date} | Date and time. | 2010/04/18 at 10:34:56 pm |
${description} | Mailbox description. | Holiday Mailbox |
${extension} | Mailbox extension. | 7560 |
${received} | Date and time message was received. | 2010/04/18 at 10:34:56 pm |
${sent} | Date and time message was sent. | 2010/04/18 at 10:34:56 pm |
${last_name} | Last name. | Smith |
${length} | Length of the message in time. | 10 seconds |
${mailbox} | Mailbox number. | 540 |
${message_type} | Type of message. | VeMail |
${mif} | Used to place the MIF phrase used for reply-to-delete. | |
${time} | Time. | 10:34:45 pm |
${total_length} | Total length of time for the entire message. | 3 seconds |
${part_number} | What part of the message this is. | |
${port} | Port number message was sent for. Used only for call data. | 3 |
${priority} | Priority of the message. | Urgent or Private |
${to} | Who the message is to. | John Smith |
${to_first} | Receivers first name. | John |
${to_last} | Receivers last name. | Smith |
${to_mailbox} | Receivers mailbox number. | 540 |
Loops provide a way for the template system to use the same block of text for repeated information. For example a list of all the attachments in a message use the same template block but will be repeated over and over in the final output therefore creating a list. Currently loops are only supported for the voice message body template and only consist of two loop types. These are reply-to-delete and detail. A loop is defined by BEGIN and END followed by the loop modifier. This modifier is then used as a parent for a standard keyword.
Example:
<!-- BEGIN detail -->Part ${part_number}: To: ${detail.to_first} ${detail.to_last} (${detail.to_mailbox}) From: ${detail.from_first} ${detail.from_last} (${detail.from_mailbox}) Created By: ${detail.created_by} ${detail.by_first} ${detail.by_last} Sent: ${detail.sent} Received: ${detail.received} Length: ${detail.length} <!-- END detail -->
VMS101TEMPLATE.TXT
${priority} ${message_type} from ${from}
From: ${from_first} ${from_last} Mailbox: ${from_mailbox} <!-- BEGIN replytodelete --> To delete this message from your voice mailbox, reply with original message body. ${mif} <!-- END replytodelete --> To: ${to_first} ${to_last} (${to_mailbox}) From: ${from_first} ${from_last} (${from_mailbox}) Created By: ${created_by} ${by_first} ${by_last} Sent: ${sent} Received: ${received} Total Length: ${total_length} Detail ------------------------------------------------------------------------------ <!-- BEGIN detail -->Part ${part_number}: To: ${detail.to_first} ${detail.to_last} (${detail.to_mailbox}) From: ${detail.from_first} ${detail.from_last} (${detail.from_mailbox}) Created By: ${detail.created_by} ${detail.by_first} ${detail.by_last} Sent: ${detail.sent} Received: ${detail.received} Length: ${detail.length} <!-- END detail --> ------------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head></head> <body style="padding: 0; margin: 0; color: #000000; font-family: 80% Verdana, Arial, Helvetica, sans-serif; font-size: small;"> <div style="margin: 3px; background-color: #00; border: 2px solid #000; padding: 5px; width: 98%;"> <table> <tr> <td> <img alttext="logo" src="cid:logo" border="0"> </td> <td> <div style="color: Black; font-family: 'Verdana'; font-weight: bold;">From: ${from_first} ${from_last}</div> <div style="color: Black; font-family: 'Verdana'; font-weight: bold; font-size: x-small;">Mailbox: ${from_mailbox}</div> <!-- BEGIN replytodelete --> <div style="font-size: xx-small;">To delete this message from your voice mailbox,<br>reply with original message body.</div> <div style="font-size: xx-small; display: none;">${mif}</div> <!-- END replytodelete --> </td> </tr> </table> <hr> <table width="100%" align="center"> <tr> <td style="background-color: #ebf3ff; text-align: right; width: 30%;" bgcolor="#ebf3ff" align="right">To:</td> <td style="background-color: #ebf3ff; text-align: left;" bgcolor="#ebf3ff" align="left">${to_first} ${to_last} (${to_mailbox})</td> </tr> <tr> <td style="background-color: #ffffff; text-align: right; width: 30%;" bgcolor="#ffffff" align="right">From:</td> <td style="background-color: #ffffff; text-align: left;" bgcolor="#ffffff" align="left">${from_first} ${from_last} (${from_mailbox})</td> </tr> <tr> <td style="background-color: #ebf3ff; text-align: right; width: 30%;" bgcolor="#ebf3ff" align="right">Created By:</td> <td style="background-color: #ebf3ff; text-align: left;" bgcolor="#ebf3ff" align="left">${created_by} ${by_first} ${by_last}</td> </tr> <tr> <td style="background-color: #ffffff; text-align: right; width: 30%;" bgcolor="#ffffff" align="right">Sent:</td> <td style="background-color: #ffffff; text-align: left;" bgcolor="#ffffff" align="left">${sent}</td> </tr> <tr> <td style="background-color: #ebf3ff; text-align: right; width: 30%;" bgcolor="#ebf3ff" align="right">Received:</td> <td style="background-color: #ebf3ff; text-align: left;" bgcolor="#ebf3ff" align="left">${received}</td> </tr> <tr> <td style="background-color: #ffffff; text-align: right; width: 30%;" bgcolor="#ffffff" align="right">Total Length:</td> <td style="background-color: #ffffff; text-align: left;" bgcolor="#ffffff" align="left">${total_length}</td> </tr> </table> <div>Detail</div> <table width="100%" align="center" style="font-size: xx-small;"> <th style="background-color: #3d80df; text-align: center; color: #ffffff;" bgcolor="#3d80df" align="center">To</th> <th style="background-color: #3d80df; text-align: center; color: #ffffff;" bgcolor="#3d80df" align="center">From</th> <th style="background-color: #3d80df; text-align: center; color: #ffffff;" bgcolor="#3d80df" align="center">Sent</th> <th style="background-color: #3d80df; text-align: center; color: #ffffff;" bgcolor="#3d80df" align="center">Created By</th> <th style="background-color: #3d80df; text-align: center; color: #ffffff;" bgcolor="#3d80df" align="center">Received</th> <th style="background-color: #3d80df; text-align: center; color: #ffffff;" bgcolor="#3d80df" align="center">Length</th> <tr> <!-- BEGIN detail --> <td align="center">${detail.to_first} ${detail.to_last} (${detail.to_mailbox})</td> <td align="center">${detail.from_first} ${detail.from_last} (${detail.from_mailbox})</td> <td align="center">${detail.sent}</td> <td align="center">${detail.created_by} ${detail.by_first} ${detail.by_last}</td> <td align="center">${detail.received}</td> <td align="center">${detail.length}</td> </tr> <!-- END detail --> </table> <hr> <div style="color: Silver; font-size: xx-small;"> Provided by: <a href="http://www.duvoice.com" style="color: Silver; font-size: xx-small;">DuVoice</a> VeMail. </div> </div> </body> </html>