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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

aspmail.asp problem

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
US
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>
 
you can't just create a cgi-bin folder, it will not work. The http server has to be configured correctly so it knows to execute scripts from the desired folder, ie: the cgi-bin or other folders.
 
ASP needs to be set up on the server as Kevin suggests, a handler needs to be added to interpret the various extensions.

What OS? What webserver?

IIS on Win*, you might be better off seeking help in th IIS forum.

Apache on Linux, then the apache forum is the place to go

HTH
--Paul

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
I'm running a linux based system with RedHat Fedora Core 2 webserver. Its a virtual dedicated server I've purchased from Godaddy.com My directory tree for the site looks like this

+ root for site
-httpdocs(root folder for html pages)
-httpsdocs(root folder for shtml pages)
-cgi-bin(i'm assuming where the asp pages will go

my problem is when I put my 'formmail.asp' link in the form tag for processing (ie. from name="form" action="forrmail.asp" method="post"> ) my server doesnt find the page because I dont know how to point to the page. I've tried everything, like using dot syntax, but no luck. Any suggestions?
 
Check out the Apache forum, if it's downloading the actual script, it's pointing to the right place, but it needs a ScriptHandler to handle your ASP pages.

HTH

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
I input a Script Alias into my httpd.conf file. Now I run the form and get an error 500.
 
just to add a lil more info... heres the error details :

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, aridley@odysseyinnovations.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


--------------------------------------------------------------------------------

Apache/2.0.51 (Fedora) Server at Port 80
 
internal server errors cover a lot of ground. No way to tell what the problem could be without seeing the code. But if it's asp code posting in the asp forum might be better (even though technically is is a CGI script).
 
find the error in the error log and we *may* be able to help

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
here is what my suexec.log file says

[2006-01-16 12:57:27]: uid: (10003/mroop) gid: (10001/10001) cmd: contact.asp

here is what the page error reads

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, aridley@odysseyinnovations.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


--------------------------------------------------------------------------------

Apache/2.0.51 (Fedora) Server at Port 80
 
try /var/log/httpd/error_log

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
[Mon Jan 16 16:16:02 2006] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
 
Does this come up for each attempt to use the formmail.asp?

search through your script for [NOT match], and see if that uncovers anything. Looks like something is checking the setup of the machine and the config files/setup doesn't match

--Paul
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.Qmessage = True
Mailer.FromName = "Al Ridley"
Mailer.FromAddress= "eightball8018@yahoo.com"
Mailer.RemoteHost = "k2smtpout.secureserver.net"
Mailer.AddRecipient "John Smith", "eightball8018@yahoo.com"
Mailer.Subject = "Great SMTP Product!"
Mailer.BodyText = "Using mail.odysseyinnovatoins server"
if Mailer.SendMail then
Response.Write "Mail sent..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
%>
</body>
</html>
 
'plesk' as far as I can see is a cpanel type thing, and it's the thing complaining, I'd log a call with your hosting support. (ASP's not really my bag, you may have more success in the ASP forums)

--Sorry
--Paul

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top