Hello, I am a beginner with ASP and to programming in general. However, I have benn asked to set up a website for our company that has a form which will then email the data to someone. I have downloaded/installed ASPEmail and have that working fine. The problem I am having is getting all of the form data to show up in the body of the email.
The form is similar to this one:
And I would like the body of the email to be formatted similar to this.
Name: form.name
Address1: form.Address1
Address2: form.Address2
City: form.City
State: form.State
Zip Code: form.zip
Email: form.email
Here is the code that I have for the script to send the email:
Any help would be greatly appreciated.
Thanks in advance!
Scott
The form is similar to this one:
Code:
Name:<input type="text" name="Name" size="50"><br>
Address1:<input type="text" name="Address1" size="50"><br>
Address2:<input type="text" name="Address2" size="50"><br>
City:<input type="text" name="City" size="50"><br>
State:<input type="text" name="State" size="50"><br>
Zip Code:<input type="text" name="Zip" size="50"><br>
Phone:<input type="text" name="Phone" size="50"><br>
Email:<input type="text" name="Email" size="50"><br>
And I would like the body of the email to be formatted similar to this.
Name: form.name
Address1: form.Address1
Address2: form.Address2
City: form.City
State: form.State
Zip Code: form.zip
Email: form.email
Here is the code that I have for the script to send the email:
Code:
<%@LANGUAGE="VBSCRIPT"%>
<%
If Request.Form("submit") = "Submit" Then
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "smtp.server.com"
Mail.Port = 25
Mail.From = "email@domain.com"
Mail.FromName = "info@domain.com"
Mail.AddAddress info@domain.com
Mail.Subject = "From Website"
On Error Resume Next
Mail.Send
Set Mail = Nothing 'Clean up your objects!!!
If Err <> 0 Then
Response.Write "Error encountered: " & Err.Description
End If
Response.Redirect("thankyou.asp")
End If
%>
Any help would be greatly appreciated.
Thanks in advance!
Scott