email - PHP Mail - Multiple or malformed newlines found -


we upgraded our version of php , getting error " warning: mail(): multiple or malformed newlines found in additional_header".

i've created experimenting different things haven't gotten work. apologize i'm not familiar how of works, please bear me.

the objective (which worked in earlier versions) send html based message (has ,
tags, etc) includes pdf attachment exists on our server.

if can give me specific adjustments, i'd appreciate greatly!

$sfrom = "[company name] <[our email]>"; $sreplyto = "[our email]"; $sparams = "-f [our email]"; $attachment = chunk_split(base64_encode(file_get_contents($spath))); $uid = md5(uniqid(time()));  $sheaders = "from: ".$sfrom."\n".             "reply-to: ".$sreplyto."\n".             "mime-version: 1.0\n".             "content-type: multipart/mixed; boundary=\"".$uid."\"\n\n".             "this multi-part message in mime format.\n".             "--".$uid."\n".             "content-type: text/html; charset='iso-8859-1'\n".             "content-transfer-encoding: 7bit\n\n".             $smessage."\n\n".             "--".$uid."\n".             "content-type: application/pdf; name=\"".$sfilename."\"\n".             "content-transfer-encoding: base64\n".             "content-disposition: attachment; filename=\"".$sfilename."\"\n\n".             $attachment."\n\n".             "--".$uid."--";     if (!mail($sto, $ssubject, "", $sheaders, $sparams)) {     $berror = true; } 

try using \\\n instead of \n.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -