Hi. I'm pretty new to the ASP part of the web developement world and need some help.
I built an ASP form that sends and works pretty musch exactly liek I want it to. The problem is that when the results of the form are emailed, you recieve a blank email. I should be receiving an email with the senders name, email, and comments. My hosting company thinks that there is something missing from that code that would make that information send or that the page that the code is .htm when it should be .asp. Could someone help me figure out whats wrong with my code so the information thats trying to be sent is actually getting sent?
Here is the code for my form (I have this in both .htm and .asp):
<form name="Testing" method="post" action="ASPEmail_confirm.asp"> <table cellpadding="2" cellspacing="2"> <tr> <td height="40" colspan="2" bgcolor="white">ASPEmail - Contact Form</td> </tr> <tr> <td>Your Name:</td> <td><input name="VisitorName" type="text" size="46" /></td> </tr> <tr> <td>Your Email:</td> <td><input name="VistorEmail" type="text" size="46" /></td> </tr> <tr> <td valign="top">Your Message:</td> <td><textarea name="VistorComments" cols="35" rows="10"></textarea></td> </tr> <tr> <td> </td> <td align="right"><input type="submit" name="Submit" value="Submit" /></td> </tr> </table> </form>
this is the code for the .asp page:
<% DIM strVName, strVEMail, strVComments strVName = request.form("VisitorName") strVEMail = request.form("VisitorEMail") strVComments = request.form("VisitorComments") %> <% DIM Mail, strMsgHeader Set Mail = Server.CreateObject("Persits.MailSender") Mail.Host = "mail.example.com" Mail.Username = "email@example.com" Mail.Password = "xxxxx" Mail.From = strVEMail Mail.FromName = strVName Mail.AddAddress "firstname.lastname@example.org" Mail.AddReplyTo strVEMail Mail.Subject = "Email From Your Website" Mail.Body = strVComments %> <% On Error Resume Next Mail.Send Set Mail = Nothing IF Err <> 0 THEN Response.Write "There has been an error and your message could not be sent at this time using this form. Please contact us directly at (xxx)xxx-xxxx. " & Err.Description END IF %>
Thank you so much.