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" . "
";
$headers.= "Content-Type: multipart/alternative; boundary=" .$mime_boundary. "
";
$headers.= "Content-Type: text/html; charset=UTF-8" . "
";
$headers.= "Content-Transfer-Encoding: 7bit" . "
";
$text_content = file_get_contents('emails/welcome_txt.tpl');
$html_content = file_get_contents('emails/welcome.tpl');
$body = "--{$mime_boundary}--
";
$body.= "Content-Type: text/plain; charset=charset=us-ascii
";
$body.= "Content-Transfer-Encoding: 7bit
";
$body.= $text_content;
$body.= "
";
$body.= "--{$mime_boundary}--
";
$body.= "--{$mime_boundary}--
";
$body.= "Content-Type: text/html; charset=iso-8859-
";
$body.= "Content-Transfer-Encoding: 7bit
";
$body.= $html_content;
$body.= "
";
$body.= "--{$mime_boundary}
";
$body = str_replace("{Username}",$en['user'],$html_content);
mail($en['email'], $subject, $body, $headers, '-f' . $returnpath);