Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Having problems with .asp form to email code, help please?
Old 09-16-2004, 01:03 AM Having problems with .asp form to email code, help please?
Junior Talker

Posts: 1
Trades: 0
(not sure if this should be here or HTML help...)

The form is at www.glamjewellery.com/order.php
As you can see, when you submit, this message comes up:

"The requested method POST is not allowed for the URL /sendmail.asp"

But I thought the only methods you can put in a form are post and get, but I don't want it to get.

The .asp file is here: http://my-addiction.com/glam/sendmail.asp

Is there a simple reason why this isn't working for me?

Thanks
mikaela is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-16-2004, 11:27 AM
xela220's Avatar
Experienced Talker

Posts: 49
Trades: 0
The script is using a bunch of hidden fields as far as I can tell.
'************************************************* ******
'Get values from hidden fields for sending the mail
'************************************************* ******

form_from = Request.Form("mail_from") 'who is the mail from, e.g. feedback@yoursite.com
form_to = Request.Form("mail_to") 'who is the mail to, e.g. info@yourcompany.com
form_cc = Request.Form("mail_cc") 'leave blank if not needed! who is the carbon copy to be sent to, e.g. joe@yourcompany.com
form_bcc = Request.Form("mail_bcc") 'leave blank if not needed! who is the blind carbon copy to be sent to, e.g. karen@yourcompany.com
form_subject = Request.Form("mail_subject") 'text to appear in subject line of the e-mail
form_importance = Request.Form("mail_importance") 'importance of the e-mail. Must be a number 0, 1 or 2. 2 = High, 1 = Normal, 0 = Low
form_redirect = Request.Form("mail_redirect") 'page to redirect to after sending e-mail, e.g. http://yoursite.com/thankyou.htm


To debug start by writing out all the parameters being passed then make sure that you are getting all the values (emails, names, etc)
Response.Write(Request.Form("mail_from"))


If that doesn't tell you anything, Try sending the email programatically first in another page alone.

'************************************************* ******
'Get values from hidden fields for sending the mail
'************************************************* ******
SET objMail = Server.CreateObject("CDONTS.NewMail")
objMail.BodyFormat = 1
objMail.MailFormat = 1
objMail.From = form_from
objMail.To = "email@domain.com"
objMail.CC = "email@domain.com"
objMail.BCC = "email@domain.com"
objMail.Subject = "Some subject"

objMail.Body = "Some text"
objMail.Send 'This line actually sends the e-mail
SET objMail = NOTHING

Hopes that help. Next time provide error message.

Good luck,
xela220 is offline
Reply With Quote
View Public Profile
 
Old 09-16-2004, 11:44 AM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
Because I'm able to see the code for the .asp file on your server, I'm assuming ASP is not allowed.
Are you on a Linux server or windows?
Anacrusis is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Having problems with .asp form to email code, help please?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.41294 seconds with 12 queries