This is my code of sending email but it gives error "Multiline found" instead of sending email.
case 5: // email for sending different report attachments //
////// attachment header ///////////////////////////////
$headers = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "From: cashxcash.com<{$sender}>";
$headers[] = "Content-Type: multipart/mixed; boundary=\"{$uid}\"";
$headers[] = "This is a multi-part message in MIME format.";
$headers[] = "--{$uid}";
$headers[] = "Content-type:text/plain; charset=iso-8859-1"; // Set message content type
$headers[] = "Content-Transfer-Encoding: 7bit";
$headers[] = ""; // Dump message
$headers[] = "--{$uid}";
$headers[] = "Content-Type: application/octet-stream; name=\"{$fileName}\""; // Set content type and file name
$headers[] = "Content-Transfer-Encoding: base64"; // Set file encoding base
$headers[] = "Content-Disposition: attachment; filename=\"{$fileName}\""; // Set file Disposition
$headers[] = $encoded_content; // Dump file
$headers[] = "--{$uid}--"; //End boundary
return mail($reciever,"{$variables['emailContains']} Report from Cashxcash!","", implode("\r\n", $headers) );
break;
case 5: // email for sending different report attachments //
////// attachment header ///////////////////////////////
$headers = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "From: cashxcash.com<{$sender}>";
$headers[] = "Content-Type: multipart/mixed; boundary=\"{$uid}\"";
$headers[] = "This is a multi-part message in MIME format.";
$headers[] = "--{$uid}";
$headers[] = "Content-type:text/plain; charset=iso-8859-1"; // Set message content type
$headers[] = "Content-Transfer-Encoding: 7bit";
$headers[] = ""; // Dump message
$headers[] = "--{$uid}";
$headers[] = "Content-Type: application/octet-stream; name=\"{$fileName}\""; // Set content type and file name
$headers[] = "Content-Transfer-Encoding: base64"; // Set file encoding base
$headers[] = "Content-Disposition: attachment; filename=\"{$fileName}\""; // Set file Disposition
$headers[] = $encoded_content; // Dump file
$headers[] = "--{$uid}--"; //End boundary
return mail($reciever,"{$variables['emailContains']} Report from Cashxcash!","", implode("\r\n", $headers) );
break;