<html>
<title>Form with Template Email</title>
<form method=post action=processform>
First Name: <input type=text name=firstname size=15><br>
Last Name: <input type=text name=lastname size=20><br>
Street Address: <input type=text name=streetaddress size=40><br>
City: <input type=text name=city size=20><br>
State, Zip: <input type=text name=state size=2 maxsize=2><br>
<input type=text name=zipcode size=10><br>
Email: <input type=text name=email size=40><br>
Phone: <input type=text name=phone size=40><br>
Comments:<br>
<textarea name=comments rows=5 cols=40>
</textarea><br>
<input type=submit value="Send">
</form>
</html>
<<OVERLAY processform
email_templatename="template.txt"
COPY FILE=email_templatename TS="," TO void /COPY
mytext=void[1]
mysubject=void[2]
# perform search and replace on text /#
mytext=REPLACEALL(mytext,"[FirstName]",firstname)
mytext=REPLACEALL(mytext,"[LastName]",lastname)
mytext=REPLACEALL(mytext,"[Street]",streetaddres)
mytext=REPLACEALL(mytext,"[City]",city)
mytext=REPLACEALL(mytext,"[State]",state)
mytext=REPLACEALL(mytext,"[Zip]",zip)
mytext=REPLACEALL(mytext,"[email]",email)
mytext=REPLACEALL(mytext,"[phone]",phone)
mytext=REPLACEALL(mytext,"[comments]",comments)
# perform search and replace on subject /#
mysubject=REPLACEALL(mysubject,"[FirstName]",firstname)
mysubject=REPLACEALL(mysubject,"[LastName]",lastname)
NETMAILSEND("","yourname@yourserver.com",mysubject,mytext,
"40","","text/html","")
GOTO "thank_you.html"
>>