Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Method not allowed


  • Please log in to reply
2 replies to this topic

#1 JUICYboy

JUICYboy

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:06:06 AM

Posted 18 May 2010 - 08:41 PM

On the hosting from Yahoo there is a error message that says:

Sorry, Method Not Allowed.
The requested method is not allowed for this URL.

But every time I upload the code to another hosting account it works fine:
The error log in yahoo says:

2010 May 18 20:35:25 Result: 9
2010 May 18 20:35:25 From address not in member domain. Message not sent.

So custumer Service said there is something wrong with the PHP code in the $headers = "From: $email"; .

But it works fine in other servers. Anybody had the same issue with Yahoo's hosting?
Here is the PHP code:
<?php
$to = "info@jandjcarburetors.com";
$subject = "JandJ Carburators";
$email = $_REQUEST['email'] ;
$message = "=====Customer Inquiry=====" . "\n" ."\n" ;
$message .= "Customer Name:" .$_POST['Name'] ."\n" ;
$message .= "Phone#:" .$_POST['Phone'] . "\n" ;
$message .= "E-mail:" .$_POST['email'] ."\n" ;
$message .= "Address:" .$_POST['Address'] ."\n" ;
$message .= "City:" .$_POST['City'] ."\n" ;
$message .= "State:" .$_POST['StateZip'] ."\n" ;
$message .= "Contact me by:" .$_POST['Contact'] . "\n" ;
$message .= "Best Time to Call:" .$_POST['CallingTime'] ."\n" ;
$message .= "Notes:" .$_POST['message'] ."\n" ;
$headers = "From: $email";
$sent = mail($to, $subject, $message) ;
if($sent)
{print "Your mail was sent successfully, please click the back button. Thank-You."; }
else
{print "We encountered an error sending your mail"; }
?>

BC AdBot (Login to Remove)

 


#2 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:09:06 PM

Posted 18 May 2010 - 09:02 PM

Correct me if i'm wrong, but your using $_REQUEST to get the email, where are you requesting it from?

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.


#3 JUICYboy

JUICYboy
  • Topic Starter

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:06:06 AM

Posted 18 May 2010 - 11:55 PM

Yea I was using the $_REQUEST, it is coming from order.html :trumpet:

But no worries I just fixed it.

What happens is that Yahoo hosting only allows the form to be forwarded if the email that was inputed into the " $headers = "From: $e-mail" ;"

is coming from a e-mail that is in the domains e-mail list.

So what I had to do is create a "e-mail2" that will always have the e-mail address of the domain as a defult being sent to $headers = "From: $e-mail2" ;.
In the php code to manipulate their way of sending forms :thumbsup:

Its the only way around it, other hoster's don't do that, they sure pissed me off. :inlove:

Well thanks for helping me out, have a good day :flowers:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users