Hello:
I HAD a working ASP page that sent the user info to a MS Access database and to my email address (using Jmail). Then I changed servers Now th ASP page will NOT work and is generating this error message.
-----------------------
Method Not Allowed
The requested method POST is not allowed for the URL /ProofPages/SendProofRequestPage.asp.
-----------------------
THEN I find out my NEW server dosen't support ASP pages unless I pay 1.00 extra a month
So I siad OK add the ASP feature. NOW they tell me they have to move me to a NEW server
While I am waiting for the server to resolve my domain name I am looking at the code and see where it is pointing to my Original server.
msg.Send( "relay.softcomca.com" )
I emailed support, and asked them what I needed to replace the old server info with.
They replied. >You should be able to use mail.yourdomain
I replaced:
msg.Send( "relay.softcomca.com" )
With:
msg.Send( "mail.agisolutions.com" )
I get the same error message.
Method Not Allowed
The requested method POST is not allowed for the URL /ProofPages/SendProofRequestPage.asp.
I will point out that I am VERY new at this and I am way over my head BUT I was able to make this work the first time
Listed below are a few emails back in fourth with my servers support person.
I am thinking they are NOT on the same page as I am, but I am NOT advanced enough to say for sure.
Thats why I am posting here.
Thanks for any help
Bill Dannels
++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++
If you have a php.ini, you must change register global variable to on.
Date: 12-22-2004 1:00pm EST
Subject: No subject Posted by Bill Dannels
Thanks for looking into this.
I don't have a grasp of what you are saying.
relay.softcomca.com was from the server I was on before I came here.
' incoming e-mails from your web server:
msg.Send( "relay.softcomca.com" )
Delete Post Date: 12-22-2004 12:31pm EST
Subject: No subject Posted by ACENET INC (Staff)
Try setting up a cname for: relay.softcomca.com if one is not already set up in the dns zone.
Date: 12-22-2004 11:16am EST
Subject: No subject Posted by ACENET INC (Staff)
We will see what we can find on this matter.
Acenet
Date: 12-22-2004 8:14am EST
Subject: No subject Posted by Bill Dannels
Hello Again:
Still have the same problem on samplerequest.asp
I replaced:
msg.Send( "relay.softcomca.com" )
With:
msg.Send( "mail.agisolutions.com" )
>You should be able to use mail.yourdomain
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++
SOME OF THE CODE FROM THE asp PAGE IS PASTED BELOW
<html>
<head>
<%
'================================================= =======
' When you press ENTER in a text box, a carriage return
' is created. A carriage return is represented by a
' Chr(13). Because this information will be displayed
' as HTML, replace the carriage returns with
' the <br> tag.
Function ParseBody(strText)
' This function replaces the Chr(13) with a <br>
' tag in whatever string is passed to it.
strText = Replace(strText, Chr(13), "<br>")
ParseBody = strText
End Function
' Send results to the database.
' This portion of the page sends the information
' from the form to the Northwind sample database.
' Variable declaration:
' myConnString = Connection string to database.
' myConnection = The database connection object.
' mySQL = The query string to be used.
Dim myConnString
Dim myConnection
Dim mySQL
Dim strBody
' Set up connection string. When you created the
' database connection in FrontPage called "Sample",
' FrontPage created an Application variable in the
' Global.asa file called "Sample_ConnectionString".
'
' Use that connection string by populating the
' myConnString variable with the value contained
' in the Application variable.
'
' You can modify this to work with your database by
' changing "Sample_ConnectionString" to reflect your
' FrontPage database connection. For example, if you
' defined your connection in FrontPage as "Database1",
' you would change the following line to this:
' myConnString = Application("Database1_ConnectionString")
myConnString = Application("SampleRequest_ConnectionString")
' When you are using custom ASP to set up a connection to
' a database, you use a Connection to connect to the
' database. The following line creates that connection and
' assigns the myConnection variable to contain the
' Connection object.
Set myConnection = Server.CreateObject("ADODB.Connection")
' After the connection has been created, open it so that
' information can be written to the database. To do
' that, use the Open method and pass it the connection
' string that you defined earlier.
myConnection.Open myConnString
' This is the SQL string that queries the database.
' In this example, Request.Form("[form_field]")
' pulls information from the form and populates the SQL
' string with it.
'
' You can modify this SQL string to work with your own
' database by following this format. Pay special
' attention to the fact that spaces are not optional.
' mySQL = "INSERT INTO [your_table_name] "
' mySQL = mySQL & "([database_field_names]) "
' mySQL = mySQL & "VALUES ('[form_field_names]')"
' For more information about this, see the
' Customizing the Database Page section of this document..
mySQL= "INSERT INTO Results "
'mySQL= mySQL & "(name,email,company,address,city,state) "
mySQL= mySQL & "(name,email,company,address,city,state,zip,phone, fax,sample,OtherInformation) "
mySQL= mySQL & "VALUES ('" & Request.Form("name") & "','"
mySQL= mySQL & Request.Form("email") & "'"
mySQL= mySQL & ",'" & Request.Form("company") & "'"
mySQL= mySQL & ",'" & Request.Form("address") & "'"
mySQL= mySQL & ",'" & Request.Form("city") & "'"
mySQL= mySQL & ",'" & Request.Form("state") & "'"
mySQL= mySQL & ",'" & Request.Form("zip") & "'"
mySQL= mySQL & ",'" & Request.Form("phone") & "'"
mySQL= mySQL & ",'" & Request.Form("fax") & "'"
mySQL= mySQL & ",'" & Request.Form("sample") & "'"
mySQL= mySQL & ",'" & Request.Form("OtherInformation") & "')"
'================================================= =======
' Execute the connection with the SQL string.
' This runs the SQL string against the database and inputs
' the information.
'================================================= ========
myConnection.Execute mySQL
'=== Close the connection.
myConnection.Close
'=== Set the connection equal to Nothing.
'=== This frees resources used by it.
Set myConnection = Nothing
'================================================= =================================================
=====================
' Send the results to e-mail.
' Use Jmail to create and send a message based on information
' First of all we need to create an instance of the jmail.message object:
set msg = Server.CreateOBject( "JMail.Message" )
' Now lets turn on logging to make any debugging easier:
msg.Logging = true
' We need to provide a sender as well as a recipient:
msg.From = Request.Form("email")
'msg.From = "john.doe@agisolutions.com"
msg.FromName = Request.Form("name")
' msg.From = "john.doe@agisolutions.com"
' msg.FromName = "John Doe"
' msg.AddRecipient "lisa.simpson@springfield.com"
' The addRecipient method can be used multiple times to add more than one
' recipient. Also, it can take an optional parameter which specifies the name of
' the recipient:
'msg.AddRecipient "admin@agisolutions.com", "AGIsolutions"
msg.AddRecipient "sample@agisolutions.com", "Daniel"
msg.AddRecipient "bdannels@agisolutions.com", "Bill"
' Ok, now we should add a subject:
msg.Subject = "Sample Request"
' and a body. The example below also shows how to add carriage returns:
' msg.Body = "This w3 JMail stuff rocks!" & vbCrLf
strBody = "Name: " & Request.Form("name") & vbCrLf
strBody = strBody & "E-mail: " & Request.Form("email") & vbCrLf
strBody = strBody & "Company: " & Request.Form("company") & vbCrLf
strBody = strBody & "Address: " & Request.Form("address") & vbCrLf
strBody = strBody & "City: " & Request.Form("city") & vbCrLf
strBody = strBody & "State: " & Request.Form("state") & vbCrLf
strBody = strBody & "Zip: " & Request.Form("zip") & vbCrLf
strBody = strBody & "Phone: " & Request.Form("phone") & vbCrLf
strBody = strBody & "Fax: " & Request.Form("fax") & vbCrLf
strBody = strBody & "Sample: " & Request.Form("sample") & vbCrLf
strBody = strBody & "Other Information: " & Request.Form("OtherInformation") & vbCrLf
msg.Body = strBody
' Another way to create the body of the e-mail is to use the appendText
' method, which can be used multiple times to build the e-mail body:
' msg.appendText "Here’s some text."
' msg.appendText "And here’ s some more"
' There you go, the e-mail message is complete, now all we need is to send it.
' To do that we need to enter the address of a valid mail server which accepts
' incoming e-mails from your web server:
msg.Send( "mail.agisolutions.com" )