Jump to content

Mail headers causing 500 sever error?


gergy008

Recommended Posts

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

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.