Hallo Leute,
Ich habe ein Problem beim autmatischen versenden von E-Mails mit PDF als Dateianhang
Der Server ist bei Schlund und komischer weise kommt die datei ohne mailanhang an .... und auch ohne Datei
hier mal der Code
Code:
$boundary = strtoupper(md5(uniqid(time())));
$mail_header = "From:buchhaltung@auftragshaus.de\n";
$mail_header .= "MIME-Version: 1.0";
$mail_header .= "\nContent-Type: multipart/aternative; boundary=$boundary";
$mail_header .= "\n\nThis is a multi-part message in MIME format -- Dies ist eine mehrteilige Nachricht im MIME-Format";
$mail_header .= "\n--$boundary";
$mail_header .= "\nContent-Type: text/plain";
$mail_header .= "\nContent-Transfer-Encoding: 8bit"; [/quote] $mail_header .= "\n\n$mailtext";
$file_content = fread(fopen($filename,"r"),filesize($filename));
$file_content = chunk_split(base64_encode($file_content));
$mail_header .= "\n--$boundary";
$mail_header .= "\nContent-Type: application/pdf; name=\"$filename\"";
$mail_header .= "\nContent-Transfer-Encoding: base64";
$mail_header .= "\nContent-Disposition: attachment; filename=\"$filename\"";
$mail_header .= "\n\n$file_content";
$mail_header .= "\n--$boundary--";
wäre nett wenn ihr mir mla helfen könntet
