About TemplateMailer :: Try / Purchase :: Support :: Company Information :: Feedback

HTML Form Hidden Fields
Most of the commands used to manage and maintain the TemplateMailer WebDelivery system can be sent as hidden form fields with each message. As defined in the NodeElement definitions, these can override the global settings of the TemplateMailer system. Each of the hidden commands use a reserved naming convention of field names which begin with "_" and are not processed or included in any of the mail message templates or delimited lists. A sample of these can be viewed at the test.html file included with the setup. The hidden fields listed below in BOLD may also be included within the Config.XML file for more secure usage.

_configfile This specifies an alternative location for the Config.xml configuration file.
_debugmode This boolean (true/false) will allow the TemplateMailer system to send additional debugging information with the Text email message.
_subject The subject message of the email to be sent. This field is parsed for all available variables. Review the Template Design section for proper documentation.
_redirectURL This is the URL to redirect the user upon submission of the mail form. If not provided the ThankYouMessage template will be processed and returned to the web browser.
_mailport Reset the mail server port to connect to for sending mail.
_mailserver Reset the mail server used to send mail messages. Review the restrictions of this field in the NodeElement Definitions section of this document.
_secondarymailserver Reset the secondary mail server used to send mail messages. Review the restrictions of this field in the NodeElement Definitions section of this document.
_tertiarymailserver Reset the tertiary mail server used to send mail messages. Review the restrictions of this field in the NodeElement Definitions section of this document.
_senderemail The email address to use as the sender of the message.
_ReplyToEmail The email address to display as sending replies. NOTE: not all email clients support this feature. Be sure the anti-spam features of you relaying mail server will allow this address to be used.
_recipientemail The email address of the recipient of the mail message.
_ccemail A comma delimited list of addition email addresses to CC the email message.
_bccemail A comma delimited list of addition email addresses to BCC the email message.
_txtTemplate The template used to send the TEXT email message. The file path to the file must be defined as a relative path from the config.xml file.
_htmlTemplate The template used to send the HTML email message. The file path to the file must be defined as a relative path from the config.xml file.
_ThankYouTemplate The template used to send the Thank You/Confirmation message to the web browser upon submission. The file path to the file must be defined as a relative path from the config.xml file.
_sendresponse Set to true to allow the sending of an AutoResponse message if all information is provided. NOTE : The email address the AutoResponse message will respond to must be a form field or querystring field titled "email".
_responseemail The sender's email address of the AutoResponse. This is required to send an AutoResponse message.
_responsesubject The subject message of the AutoResponse.
_responsetxtTemplate The template used to send the AutoResponse TEXT email message. The file path to the file must be defined as a relative path from the config.xml file. This is required to send an AutoResponse message.
_responsehtmlTemplate The template used to send the AutoResponse HTML email message. The file path to the file must be defined as a relative path from the config.xml file.
_sendHTML Set to true to allow the sending of HTML message if an htmlTemplate is provided.
_sendnotification Adds the appropriate request for return receipt when the email is read. Note: not all email clients and mail servers support this feature. This is not a supported feature.
_TempFolder This is the folder where uploaded files to be sent as attachments are stored. This file must have write permissions by the ASPNET user account. For more instructions refer to the Using Attachments section of this document.
_includeList Set to true to allow the inclusion of an array at the bottom of the TEXT email message based upon the LogDelimiter.
_SendIncludeListasAttachment Set to true to allow the array of fields to be added to the email message as an attachment. The _IncludeList must also be set to true.
_IncludeLogFile This boolean (true/false) will allow the TemplateMailer system to log results passed through the system to a separate file.
_LogDelimiter If not LogFileTemplate is used, this is the delimiter to separate field results. The default is "|".
_LogFile The file to be used to record results passed through the system. The file path to the file must be defined as a relative path from the config.xml file.
_LogFileTemplate The template used to populate the log file. All fields are replaced using the same format ##FIELDNAME## and can be formatted in any manner including comma-delimited, tab-delimited, XML or others. The file path to the file must be defined as a relative path from the config.xml file. A special field ##DATETIME## is available to record the date and time of the transaction.
_SelectionVars The is a comma-delimited list of all checkbox and radio button form fields within the form. In the event a person does not select one of the options, TemplateMailer will parse the list and replace the ##FIELDNAME## with an empty/null value. THIS FEATURE IS OUTDATED. The TemplateMailer now performs a standard parsing of all templates prior to delivery to clean and remove any remaining, unparsed ##FIELDNAME##.

Using Attachments
Besides all of the standard .NET Web Form Controls, HTML form fields and Query String variables the TemplateMailer will also detect and include any files uploaded with the form and email them as attachments. The included test.html file includes a sample of this type of functionality. In order to allow files to be uploaded through the form, the following code must be added to the

enctype="multipart/form-data". When files are uploaded, the TemplateMailer will save the files on the server in the location defined within the _TempFolder variable. The web server and the ASPNET user account on the computer must have the appropriate permissions to this folder to allow the attachment to be saved.

For the TemplateMailer to properly function this folder must have "WRITE" permissions by the ASPNET, IUSER and IWAM IIS accounts. This can either be done in IIS or through Windows Explorer. To do so using Windows Explorer, right click on the "files" folder and select Properties. Under the Security Tab, add the IUSER and IWAM IIS accounts to the permissions and select "WRITE" for both.

If you are using Windows XP and do not see the Securities tab do the following :
run the command : gpedit.msc
you will see a window "Group Policy"
Open Local Computer Policy > Computer Configration > Windows Setting > Security Setting > Local Policies > Security Options
SET "Network access: Sharing and security model for local accounts" TO "Classic"

NOTE: There is a risk whenever users are allowed to upload files and send as attachments with the emails that they may contain viruses or other malicious programs. TemplateMailer does not protect against these types of intrusions and you should instruct all recipients to be running a current anti-virus software package on their computer(s).

Advanced Form Field Topic
Although each of the command fields is defined as hidden form fields, they can also be sent as regular HTML fields. For example, if you want the "_senderemail" to be the address of the person who submits the information, include a INPUT TYPE=TEXT field with a field name of "_senderemail". Be sure to validate this is a properly formed email someone@somewhere.com or the message may be rejected by your mail server as invalid or spam. This method can also be used to allow the individual to select from a list (select menu, checkbox, radio list) of the recipient "_recipientemail" or "_ccemail" list to send the message to; e.g. technical support, sales, human resources, etc.



Copyright 2001 - 2017
Tectonic Concepts, LLC, All Rights Reserved