Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

Email headers are shown within the email body

Author: Edward Hardin Reference Number: AA-00707 Views: 9146 Last Updated: 02/08/2012 10:46 AM 0 Rating/ Voters

It happens because the mail program on the server replaces \n (the new line character) with \r\n (carriage return + new line character). This behavior is common for old versions of mail programs. KMP ends each line in its email messages with \r\n (it is correct behavior) and then the mail program makes the mentioned replacement and it becomes \r\r\n which gives you an extra empty line. This is why email headers are shown in the email body (two new lines define the end of the headers by convention).

If you're not plnning to update the mail program, there is a workaround that you can use. Simply open this file under the KMP folder:

\admin\application\config\config.php

and search for this setting:

$config['mail_newline'] = "\r\n";

By default it is set to \r\n.

And you need to change it to \n:

$config['mail_newline'] = "\n";
After saving the file, it should now work correctly.