[CODE]<?php
$empfaenger = „empfaenger@mailadresse.xy“; // Empfänger E-Mail Adresse
$betreff = „E-Mail mit Anhang“; // Betreff
$dateiname = „bild.gif“; // Dateiname
$dateiname_mail = „anhang.gif“;
$id = md5(uniqid(time()));
$dateiinhalt = fread(fopen($dateiname, „r“), filesize($dateiname));
// Absender Name und E-Mail Adresse
$kopf = „From: Manfred Mustermann <meine@mailadresse.xy>\n“;
$kopf .= „MIME-Version: 1.0\n“;
$kopf .= „Content-Type: multipart/mixed; boundary=$id\n\n“;
$kopf .= „This is a multi-part message in MIME format\n“;
$kopf .= „–$id\n“;
$kopf .= „Content-Type: text/plain\n“;
$kopf .= „Content-Transfer-Encoding: 8bit\n\n“;
$kopf .= „E-Mail mit Anhang“; // Inhalt der E-Mail (Body)
$kopf .= „\n–$id“;
// Content-Type: image/gif, image/jpeg, image/png
$kopf .= „\nContent-Type: image/gif; name=$dateiname_mail\n“;
$kopf .= „Content-Transfer-Encoding: base64\n“;
$kopf .= „Content-Disposition: attachment; filename=$dateiname_mail\n\n“;
$kopf .= chunk_split(base64_encode($dateiinhalt));
$kopf .= „\n–$id–“;
mail($empfaenger, $betreff, „“, $kopf); // E-Mail versenden
?>
[/CODE]
Hallo,
ich möchte eine Mail mit mehreren Anhängen versenden.
Obigen Code habe ich verwendet, der geht auch für eine Mail
Nun weiß ich nicht wie ich mehrere anhängen kann.
Kann mir da jemand bitte weiterhelfen?