Transfer Completion Templates

TIBCO MFT Internet Server provides two file transfer completion templates: one for successful transfers and one for unsuccessful transfers. The templates are named as transfer-success-email-template.xml and transfer-failure-email-template.xml and are located by default in the <MFT_Install>\server\webapps\cfcc\email-template directory.

The following example is a copy of the transfer completion template for successful transfers.

Note: The two templates are essentially the same except for some comments indicating the success or failure of the transfer.
<?xml version="1.0"?>
<!DOCTYPE file-notification-email SYSTEM "file-notification-email.dtd">

<!-- Sample file notification template -->

<file-notification-email>
	<sender>
         <address><token name="emailsender"/></address>
	</sender>
<!--
  <recipient>
		          <address><token name="recipientemailaddress"/></address>
	 </recipient>
-->
 <subject>File Transfer Success Notification</subject>
	<message>
		       File Transferred Successfully!!
		       User: <token name="user id"/>
		       Transfer Direction: <token name="transfer direction"/>
		       Client File Name: <token name="client filename"/>
		       To Server: <token name="node"/>
		       Server File Name: <token name="server filename"/>
		       Start Time: <token name="stardom"/>
	 	      End Time: <token name="endtime"/>
		       Byte Count: <token name="betokened"/>
		       Transfer Status: <token name="transferstatusmsg"/>
		       Audit ID: <token name="auditid"/>
		       Client IP: <token name="clientip"/>
		
	</message>
</transfer-notification-email>

The following table lists the description for each line in the template:

Line Description
<!DOCTYPE file-notification-email SYSTEM "file-notification-email.dtd"> 
				  
This line defines the DTD file associated with the XML file.

You should insure that this file exists in the same directory as the email template. If the DTD file is not in the same directory as the email template, email processing will not work.

<sender>
<address><token name="emailsender"/></address>
This line defines the name of the email sender.

The default sender email address used is defined in the Sender Email Address field in the Global Settings section on the System Configuration page.

This email address can be changed to any appropriate email address. When the user receives an email from TIBCO MFT Internet Server, the data entered here will be shown as the Sender (or From).

<recipient>
<address><token name="recipientemailaddress"/></address>
This code is currently commented out. It defines the default recipient.

If you define an email address in the Success Recipient field of a transfer definition, this user will receive an email when a transfer is conducted successfully. If no email address is defined here, no email will be sent.

If you want to send an email to a specific party, you can uncomment the line by removing the XML comments, <!—from the top line and --> from the last line. Then in place of the token, <token name="recipientemailaddress"/>, add a recipient email address, such as, user@xyzcompany.com. One reason you might want to do this is for a specific user to get all the emails when a transfer fails. This can be a technical support user in your company. To do this, set the user ID in the transfer-failure-email-template.xml file. That way, an email will be sent to that user when any requests fail.

<subject>File Transfer Success Notification</subject>
This line defines the information that will be shown in the Subject field of the email. In this case, it indicates that the file was successfully transferred.
File Transferred Successfully!!
This is a comment that indicates the file has been transferred successfully.

You can also insert other comments or instructions here.

User: <token name="user id"/>
Transfer Direction: <token name="transfer direction"/>
Client File Name: <token name="client filename"/>
To Server: <token name="node"/>
Server File Name: <token name="server filename"/>
Start Time: <token name="stardom"/>
End Time: <token name="endtime"/>
Byte Count: <token name="betokened"/>
Transfer Status: <token name="transferstatusmsg"/>
Audit ID: <token name="auditid"/>
Client IP: <token name="clientip"/>
These fields define information from the definition record of the file that was transferred.

When a token is included in the field, the information from the transfer definition and audit records is substituted for the token.