no pouzival som toto:
Kód:
$headers = "From: ".$from;
$file = fopen($attachment,'rb');
$data = fread($file,filesize($attachment));
fclose($file);
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
$headers .= "\nMIME-Version: 1.0\n" .
"Content-Type: multipart/mixed;\n" .
" boundary=\"{$mime_boundary}\"";
$body .= "--{$mime_boundary}\n" .
"Content-Type:text/html; charset=\"utf-8\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
$body .= "\n\n";
$data = chunk_split(base64_encode($data));
$body .= "--{$mime_boundary}\n" .
"Content-Type: {$attachment_type};\n" .
" name=\"{$attachment_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$data .= "\n\n" .
"--{$mime_boundary}--\n";
Na vsetky moje maily /gmail, inmail, zoznam atd. / to prichadzalo v pohode aj s prilohou, problem bol pravdepodobne v outlooku a thunderbirde.
Prerobil som to teda cele a pouzil som klasu PHPmailer, a teraz zda sa ze to bude fungovat v pohode. Outlook som netestoval, ale vsade inde to vyzera ok...
Neviem v com bol problem, kedze sa to nezobrazovalo len u niektorych ludi.