$body = \'This is a test\';
$subject = \'Confirmation\';
$headers = \'From: Testing Site\' . \"\\r\\n\";
$headers .= \'Reply-To: admin@myserver.com\' . \"\\r\\n\
The From
header is invalid. It must have the following syntax:
From: "name"
In your case:
From: "Testing Site"
The same goes for your Reply-To
header:
Reply-To: "Testing Site"
Which you can omit if it's the same as the From
header (like in your case).
PS: RFC 2822 doesn't state that the display-name in an address should be quoted. In other words: the following 3 headers should all work:
From: "Testing Site"
From: 'Testing Site'
From: Testing Site