Post by Stormdance on Apr 11, 2006 16:35:30 GMT
This is an advanced level tutorial showing how to set up the TFMail cgi form handler to email Antenna forms as HTML formatted email. TFMail is a more complex version of the popular FormMail script. The TFMail cgi script is available here: nms-cgi.sourceforge.net/
Make sure you know how to correctly install cgi scripts on your web server before attempting this - you may need to contact your hosting provider for information.
Step 1 - Download TFMail, read the accompanying documentation and install as described, with the following changes: In the Script Configuration section of TFMail.pl, set the CHARSET variable to 'UTF-8', and check that MAILPROG points to your web server sendmail program.
Step 2 - Edit the configuration file (default.trc):
Step 3 - Edit the email template file (email.trt) to define your HTML email structure e.g.
Once set up correctly you'll be able to receive and read form mail in any language you have installed in Windows. Here's an example showing a multilingual form mail message, submitted via an Antenna web page, being read in Outlook Express and an online web mail program: click here for screenshot...
Cheers,
Stormdance
Make sure you know how to correctly install cgi scripts on your web server before attempting this - you may need to contact your hosting provider for information.
Step 1 - Download TFMail, read the accompanying documentation and install as described, with the following changes: In the Script Configuration section of TFMail.pl, set the CHARSET variable to 'UTF-8', and check that MAILPROG points to your web server sendmail program.
Step 2 - Edit the configuration file (default.trc):
%% NMS configuration file %%
#
# TFmail configuration.
#
#
# recipient: the email address(s) to which TFmail should
# send the results of the form submission.
#
recipient: address@domain.com
#
# The names of the CGI inputs that TFmail should use to
# build the From: header of the email.
#
subject: {= param.about =}
email_input: from
redirect: http://www.yoursite.com/thankyou.htm
required: from
missing_fields_redirect: http://www.yoursite.com/error.htm
Replace the email address and web pages in the above code with your own. In this example 'about' and 'from' are the names of form EditBox fields on your Antenna page where a visitor enters their email address and a subject - here 'from' has been set as a required field.Step 3 - Edit the email template file (email.trt) to define your HTML email structure e.g.
%% NMS email template file %%
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{= param.about =}</title>
</head>
<body>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">
{= param.message =}<br>
</font>
</body>
</html>
Again 'about' and 'message' parameters are the names of form fields on your Antenna web page.Once set up correctly you'll be able to receive and read form mail in any language you have installed in Windows. Here's an example showing a multilingual form mail message, submitted via an Antenna web page, being read in Outlook Express and an online web mail program: click here for screenshot...
Cheers,
Stormdance