Mail() und MIME : Fehler im QUellcode ???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mail() und MIME : Fehler im QUellcode ???

    Hi !

    Habe folgenden Quellcode mir zusammengebaut. Das PDF wird dynamisch erzeugt und von exec in ein array zurückgegeben. Mit Foreach bau ich dann einen string auf. Nun ist die Datei aber immer kaputt. Sieht jemand hier einen Fehler ?

    BEIM ERSTEN PHP CODE IST DAS N MIT \ DAVOR ! DAS FORUM ZEIGT DEN ABER NICHT AN. BUG IM FORUM ???

    PHP Code:
                $datei_content='';
                  
    exec("htmlTOpdf -t pdf --no-localfiles --no-title --no-toc --size A4 --textfont Arial --quiet --webpage \"targetfile.php\",$datei_content2);

                foreach (
    $datei_content2 AS $content_add) {
                    
    $datei_content.=$content_add."\n";
                } 



    PHP Code:


                
    /* Generiere einen Boundary */
                
    $boundary strtoupper(md5(uniqid(time())));

                
    /* Beginne den Mail-Header mit MIME-Mail-Header */
                
    $mail_header .= "\nMIME-Version: 1.0";
                
    $mail_header .= "\nContent-Type: multipart/mixed; boundary=$boundary";
                
    $mail_header .= "\n\nThis is a multi-part message in MIME format  --  Dies ist eine mehrteilige Nachricht im MIME-Format";

                
    /* Hier faengt der normale Mail-Text an */
                
    $mail_header .= "\n--$boundary";
                
    $mail_header .= "\nContent-Type: text/plain";
                
    $mail_header .= "\nContent-Transfer-Encoding: 8bit";
                
    $mail_header .= "\n\n$mail_content";

                
    /* Hier faengt der Datei-Anhang an */
                
    $mail_header .= "\n--$boundary";
                
    $mail_header .= "\nContent-Type: application/pdf; name=\"Dateianhang.pdf\"";
                
    $mail_header .= "\nContent-Transfer-Encoding: base64";
                
    $mail_header .= "\nContent-Disposition: attachment; filename=\"Dateianhang.pdf\"";
                
    $mail_header .= "\n\n$datei_content";

                
    /* Gibt das Ende der eMail aus */
                
    $mail_header .= "\n--$boundary--"

    THX




    Attached Files
    Last edited by ToXIcS; 31-08-2002, 16:44.
Working...
X