Today I have faced with an issue: PHP inserts mail headers in the body, for example:
Reply-To: test@test.ru
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=windows-1251
X-Mailer: PHP/5.3.8-ZS5.5.0
Message-Id: <20111211211028.A229D8A0075@example.ru>
Date: Mon, 12 Dec 2011 01:10:28 +0400 (MSK)
Reply-To: test@test.ru
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=windows-1251
X-Mailer: PHP/5.3.8-ZS5.5.0
Message-Id: <20111211211028.A229D8A0075@example.ru>
Date: Mon, 12 Dec 2011 01:10:28 +0400 (MSK)
Solution was found here: http://www.johnconde.net/blog/php-mail-headers-are-displayed-in-email-body/
The problem maybe in dash between Reply and To or in /r, which should be removed. Example of correct working script: