|
|
|||||
|
The TEMPLATE_NAME string tag appears in taglists prepared for the SEND_MESSAGE function, to specify the cover template stored on the fax server to use for the cover page. A template is a Rich Text Format (RTF) file that includes placeholders. Placeholders are replaced with content derived from the fax message being sent, for example, the "$(SenderName)" placeholder in a template becomes "FaxBack, Inc." in the cover page. Placeholders for information that is not available are blank in the cover page. The fax server uses the value of the TEMPLATE_NAME tag to construct the name of a template file that is stored in the fax server's Templates directory. For example, a fax server installed at C:\Program Files\NET SatisFAXtion has a Templates directory at C:\Program Files\NET SatisFAXtion\Templates, and a TEMPLATE_NAME tag with a value of "MyCover.rtf" would reference a template file C:\Program Files\NET SatisFAXtion\Templates\MyCover.rtf. Template files can be copied into the Templates directory manually, or they can be assigned to users with the NET SatisFAXtion Administration program. When assigned to a user, the fax server copies the template file to a directory with the same name as the user, under the Templates directory. For example, assigning a template named "Contacts.rtf" to user "Supervisor" copies the template to C:\Program Files\NET SatisFAXtion\Templates\Supervisor\Contacts.rtf. To send a fax using this template file, the TEMPLATE_NAME tag would be set to "Supervisor\Contacts.rtf". The TEMPLATE_NAME tag must be a member of a CONTENT_PART
section within the SEND_MESSAGE taglist,
when the CONTENT_PART is set to 2 (COVER_TEXT).
See example below. |
|||||
| Type | Max Size | Multiple Allowed | |||
| String | 256 | No | |||
Example: |
|||||
function SendFaxCover()
{
var Tl, Sl, StatusNum;
Tl = CAS.New();
CAS.AddTag(Tl,"SEND_MESSAGE","");
CAS.AddTag(Tl,"REGISTERED_NAME",UserName);
CAS.AddTag(Tl,"REGISTERED_PASSWORD",UserPassword);
CAS.AddTag(Tl,"TRANSFER_TYPE",0); // 1= EMAIL, 0=FAX
CAS.AddTag(Tl,"SUBJECT","Subject");
Sl = CAS.CreateSection(Tl,"RECEIVER_ADDRESS","555-123-1234");
CAS.AddTag(Sl,"RECEIVER_NAME","Recipient");
CAS.CloseSection(Sl);
Sl = CAS.CreateSection(Tl,"CONTENT_PART",2); // Cover Message
CAS.AddTag(Sl,"CONTENT_TYPE",1); // File Type ASCII
CAS.AddTag(Sl,"CONTENT_DATA","This is my cover text!");
CAS.AddTag(Sl,"TEMPLATE_NAME",UserName+"\\MyCover.rtf");
CAS.CloseSection(Sl);
// Send message on this already open session
Tl = CAS.Send(cInst,Tl);
StatusNum = parseInt(CAS.GetTag(Tl,"STATUS_NUM",0));
CAS.Delete(Tl);
return(StatusNum);
}
|
|||||
| See Also: | |||||
| SEND_MESSAGE, CONTENT_PART, CONTENT_DATA, REGISTERED_NAME, REGISTERED_PASSWORD | |||||
|
|