Internal Server Error Email Php
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About sendmail php Us Learn more about Stack Overflow the company Business Learn more about hiring developers 500 internal server error php or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack php mail function Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP mail() error 500 up vote 1 down vote favorite As part of the registration process on a website, I have added mail confirmation. But for some reason, the mail function throws an Internal server error in there. The strange thing is that if I create a test script, with the exact same email (all the same parameters) it works fine, and sends the email. The mail is sent from a function in a Class, in case that helps. I didn't post the code because it isn't really relevant, even if I try mail('email@email.com','subject','email'); it fails with the 500 error! The server error logs don't show anything at all, anyone knows what may cause such a problem? Technology: The server is running php through mod_fastcgi, although this problem also happens if I switch to mod_suphp. Updates: UPDATE: I'll try to explain this better, the mail function works perfectly if called from another file, with the same parameters. The problem here is something that combined with the mail function causes an error 500. The rest of the file where it's called is fine too, if I comment the mail function everything works. The way it gets called is an AJAX request to a file that calls a function where the mail is sent (Just in case this helps) UPDATE 2: In response to answers so far, here is more information I did not share previously: OS: CentOS release 5.8 When I say error 500, I mean that the server returns only an HTTP 500 status code. The server does not show anything in any error log The most important thing is th
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million http://stackoverflow.com/questions/9658780/php-mail-error-500 programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP 500 Internal Server Error- mail function up vote 0 down vote favorite I'm getting the 500 Internal Server Error. I called goDaddy and they told me it's not something on their end. I also don't have a .htaccess http://stackoverflow.com/questions/31434919/php-500-internal-server-error-mail-function file. I checked the contact page and checked spelling it is calling the right .php file. This code was working perfectly. I tried to change something it didn't work. I tried going back to the original code and now that doesn't work either. I don't have a backup. I commented out line by line to pin-point the problem if I erase the mail($to, $subject, $message, $headers); part I don't get an error but obviously don't receive anything. Here is the website if that helps to inspect. http://www.crownjewelre.com/contacts.html
Name: | ".$first_name." | ".$last_name." |
---|---|---|
Email: | ".$email." | |
Telephone: | ".$telephone." |
Comments: ".$comments."