gergy008 Posted May 27, 2010 Share Posted May 27, 2010 I contacted my host to see what the server log said as I couldn't see it myself, But they replied and apparently the logs said that the headers were causing the error Here are my headers, What could possibly be wrong with them, And like always, I always make a silly obvious mistake! $headers="From: #######.co.uk <support@#######.co.uk>\n\r"; //Censored. $headers.="Content-Type: text/html"; $sent=mail($recipent, $subject, $email, $headers); Also the recipent, subject and email are already set with valid strings. Link to comment https://forums.phpfreaks.com/topic/203119-mail-headers-causing-500-sever-error/ Share on other sites More sharing options...
The Eagle Posted May 27, 2010 Share Posted May 27, 2010 I've never saw them headers used in that format before, I've always used. mail( "$youremail", "$subject", $message, "From: $email" ); Link to comment https://forums.phpfreaks.com/topic/203119-mail-headers-causing-500-sever-error/#findComment-1064270 Share on other sites More sharing options...
gergy008 Posted May 27, 2010 Author Share Posted May 27, 2010 I've never saw them headers used in that format before, I've always used. mail( "$youremail", "$subject", $message, "From: $email" ); Forgot to mention, I'm trying to send a HTML email, Thats why This error seems to be fixed and I did nothing at all, Nothing... I don't know why it suddenly started working! Link to comment https://forums.phpfreaks.com/topic/203119-mail-headers-causing-500-sever-error/#findComment-1064276 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.