Hi,
I'm trying to build a form for our company site and I'm not having much success. The particular server our site sits on is Windows based and does have ASPmail components. I even found some info on the site pertaining to ASPmail at .
Anyhow, I have created two pages: myform.asp & email-action.asp. You may view this at . It's not much know. I wanted a simple form first and if it works, I can elaborate later.
Currently, if I type info into the input fields and submit it, I do receive an emial. However, I don't receive any user input. I really don't know what I'm doing wrong. Here's the code for both pages.
myform.asp:
<html>
<head>
<title>Untitled Document</title>
<body>
<FORM METHOD="POST" ACTION="email-action.asp" name="Info">
Your Name: <INPUT TYPE="TEXT" NAME="Mailer.FromName"><BR>
Your Address: <INPUT TYPE="TEXT" NAME="Mailer.FromAddress"><BR>
Subject: <INPUT TYPE="TEXT" NAME="Mailer.Subject"><BR>
Message: <INPUT TYPE="TEXT" NAME="Mailer.RemoteHost"><BR>
<BR>
<INPUT TYPE="SUBMIT" VALUE="Send mail">
</FORM>
</body>
</html>
email-action.asp:
<%
Set Mailer = Server.CreateObject ("SMTPsvg.Mailer"
Mailer.FromName = "Optistreams"
Mailer.FromAddress = "danielopti@hotmail.com"
Mailer.Subject = "Your Widget Order"
Mailer.Subject = "New Contact"
Mailer.RemoteHost = "mail-fwd.verio-web.com"
Mailer.AddRecipient "Dan", "danielh68@sierratel.com"
if Mailer.SendMail then
' Message sent sucessfully
response.write ("Your message was sent"
else
' Message send failure
response.write ("Your message was not sent. "
response.write ("The error was: " & Mailer.Response)
end if
%>
A much advanced thanks to anyone who can provide help.
Best Regards,
DanH
I'm trying to build a form for our company site and I'm not having much success. The particular server our site sits on is Windows based and does have ASPmail components. I even found some info on the site pertaining to ASPmail at .
Anyhow, I have created two pages: myform.asp & email-action.asp. You may view this at . It's not much know. I wanted a simple form first and if it works, I can elaborate later.
Currently, if I type info into the input fields and submit it, I do receive an emial. However, I don't receive any user input. I really don't know what I'm doing wrong. Here's the code for both pages.
myform.asp:
<html>
<head>
<title>Untitled Document</title>
<body>
<FORM METHOD="POST" ACTION="email-action.asp" name="Info">
Your Name: <INPUT TYPE="TEXT" NAME="Mailer.FromName"><BR>
Your Address: <INPUT TYPE="TEXT" NAME="Mailer.FromAddress"><BR>
Subject: <INPUT TYPE="TEXT" NAME="Mailer.Subject"><BR>
Message: <INPUT TYPE="TEXT" NAME="Mailer.RemoteHost"><BR>
<BR>
<INPUT TYPE="SUBMIT" VALUE="Send mail">
</FORM>
</body>
</html>
email-action.asp:
<%
Set Mailer = Server.CreateObject ("SMTPsvg.Mailer"
Mailer.FromName = "Optistreams"
Mailer.FromAddress = "danielopti@hotmail.com"
Mailer.Subject = "Your Widget Order"
Mailer.Subject = "New Contact"
Mailer.RemoteHost = "mail-fwd.verio-web.com"
Mailer.AddRecipient "Dan", "danielh68@sierratel.com"
if Mailer.SendMail then
' Message sent sucessfully
response.write ("Your message was sent"
else
' Message send failure
response.write ("Your message was not sent. "
response.write ("The error was: " & Mailer.Response)
end if
%>
A much advanced thanks to anyone who can provide help.
Best Regards,
DanH