is there a way to force test the text version of my email template. All my email accounts view HTML, I need to make sure the text version displays properly.
$mime_boundary = 'Multipart_Boundary_x'.md5(time()).'x';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers.= "Content-Type: multipart/alternative; boundary=" .$mime_boundary. "\r\n";
$headers.= "Content-Type: text/html; charset=UTF-8" . "\r\n";
$headers.= "Content-Transfer-Encoding: 7bit" . "\r\n";
$text_content = file_get_contents('emails/welcome_txt.tpl');
$html_content = file_get_contents('emails/welcome.tpl');
$body = "--{$mime_boundary}--\n";
$body.= "Content-Type: text/plain; charset=charset=us-ascii\n";
$body.= "Content-Transfer-Encoding: 7bit\n\n";
$body.= $text_content;
$body.= "\n\n";
$body.= "--{$mime_boundary}--\n";
$body.= "--{$mime_boundary}--\n";
$body.= "Content-Type: text/html; charset=iso-8859-\n";
$body.= "Content-Transfer-Encoding: 7bit\n\n";
$body.= $html_content;
$body.= "\n\n";
$body.= "--{$mime_boundary}\n";
$body = str_replace("{Username}",$en['user'],$html_content);
mail($en['email'], $subject, $body, $headers, '-f' . $returnpath);
An easy way to do this without changing your code is, with your Email client, view the original email.
For example, with Gmail you can go to the top right arrow (next to reply), and select “Message Text Garbled” or “Show original”