I have created a cgi-bin directory on my web-server, and put my aspmail.asp form in the directory. I have played around with the file permissions and what not with the folder and the directory with no success. The problem I'm having is when you click the submit button, IE pops open a window asking if you want to save or open the file 'aspmail.asp' instead of running through the code. Here is the code I have for my aspmail.asp page.
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Joe’s Widgets Corp."
Mailer.FromAddress= "Joe@somehost.com"
Mailer.RemoteHost = "mailhost.localisp.net"
Mailer.AddRecipient "John Smith", "jsmith@anotherhostname.com"
Mailer.Subject = "Great SMTP Product!"
Mailer.BodyText = "Dear Stephen" & VbCrLf & "Your widgets order has been processed!"
if Mailer.SendMail then
Response.Write "Mail sent..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
*** I have replaced all of the info above with my web-server and e-mail address. Also, the form script looks like this -
<form action="/cgi-bin/aspmail.asp" method="post">
<input.. code for my form
</form>
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Joe’s Widgets Corp."
Mailer.FromAddress= "Joe@somehost.com"
Mailer.RemoteHost = "mailhost.localisp.net"
Mailer.AddRecipient "John Smith", "jsmith@anotherhostname.com"
Mailer.Subject = "Great SMTP Product!"
Mailer.BodyText = "Dear Stephen" & VbCrLf & "Your widgets order has been processed!"
if Mailer.SendMail then
Response.Write "Mail sent..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
*** I have replaced all of the info above with my web-server and e-mail address. Also, the form script looks like this -
<form action="/cgi-bin/aspmail.asp" method="post">
<input.. code for my form
</form>