\r\n Not Working in text email coding?

Elmyr

New Member
I am sending an email which attaches a pdf.This is the code:\[code\] $mpdf->WriteHTML($html); $content = $mpdf->Output('', 'S'); $content = chunk_split(base64_encode($content)); $mailto = $email; $from_name = $yourname; $from_mail = $fromwho; $replyto = $replyto; $uid = md5(uniqid(time())); $subject = 'Horse Details'; $message = 'Please find attached details about the horse medical treatment.'; $filename = 'Horse'; $header = "From: ".$from_name." <".$from_mail.">\r\n"; $header .= "Reply-To: ".$replyto."\r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n"; $header .= "This is a multi-part message in MIME format.\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-type:text/plain; charset=iso-8859-1\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n"; $header .= $message."\r\n\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-Type: application/pdf; name=\"".$filename."\"\r\n"; $header .= "Content-Transfer-Encoding: base64\r\n"; $header .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n"; $header .= $content."\r\n\r\n"; $header .= "--".$uid."--";\[/code\]I would like to add more details in the message and use \r\r for new paragraphs etc. But for some reason the \r\r or \n will not work? Suspect it is because of some of the header info but not sure which one? Had a bit of a play but could not work it out. Can you see the problem?Thank you.
 
Top