Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finishing off email script

Status
Not open for further replies.

chaddu1256

IS-IT--Management
Jan 13, 2003
28
US
I wrote a script that we use to email a form off. The code is as follows.
<%
Set Mail = Server.CreateObject(&quot;Persits.MailSender&quot;)
Mail.Host = &quot;10.1.25.10&quot;
Mail.From = Request.Form(&quot;email&quot;)
Mail.FromName = Request.Form(&quot;name&quot;) & Request.Form(&quot;lastname&quot;)

Mail.AddAddress &quot;cduhon@wd-net.com&quot;, &quot;Chad Duhon&quot;

Mail.Subject = &quot;BillerAdvantage Partnership Request&quot;
Mail.Body = &quot;BillerAdvantage Partnership Request Form:&quot; & chr(13) & chr(10) & _
&quot;First Name:&quot; & Request.Form(&quot;name&quot;)



On Error Resume Next
Mail.Send
If Err <> 0 Then
Response.Write &quot;An error occurred: &quot; & Err.Description
End If
%>

Now my problem is, in the section that says &quot;First Name:&quot; & Request.Form(&quot;name&quot;) how do I make the script grab more that one field from the form. There are multiple fields that I need to use Request.Form on. I tried placing an & just after the (&quot;name&quot;) and start the next line with a Request.Form but the script fails every time I try to run it. Any info would be great.
 
FirstName = request.form(&quot;name&quot;)
Response.write(&quot;First Name: &quot; & FirstName & &quot;<br>&quot;)
LastName = request.form(&quot;lastname&quot;)
response.write(&quot;Last Name: &quot; & LastName & &quot;<br>&quot;)
FullName = FirstName & &quot; &quot; & LastName
response.write(&quot;Full Name: &quot; & FullName & &quot;<br>&quot;)

then

mail.FromName = FullName
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top