PHP-Code:
extract($_FILES['userfile'], EXTR_PREFIX_ALL, 'uf');
if (!empty($uf_tmp_name))
{
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir . $_FILES['userfile']['name']))
{
print "File is valid, and was successfully uploaded. Here's some more debugging info:\n";
print_r($_FILES);
}
else
{
print "Possible file upload attack! Here's some debugging info:\n";
print_r($_FILES);
}
}
require("../config/config.inc.php");
require("../config/func.inc.php");
sqlconnect();
$read_email = mysql_query("SELECT email FROM msc_adr");
while(list($email) = mysql_fetch_row($read_email))
{
$pic = $uf_name;
$mailtext = $nachricht;
$fsize = filesize($pic);
$faus = fopen("$pic","r");
$file = fread($faus,$fsize);
fclose($faus);
$boundary = strtoupper(md5(uniqid(time())));
$file = chunk_split(base64_encode($file));
$mail_header = "From:$absender";
$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";
$mail_header .= "\n--.$boundary";
$mail_header .= "\nContent-Type: text/plain";
$mail_header .= "\nContent-Transfer-Encoding: 8bit";
$mail_header .= "\n\n".$mailtext;
$mail_header .= "\n--".$boundary;
$mail_header .= "\nContent-Type: image/jpeg; name=\"".$pic."\"";
$mail_header .= "\nContent-Transfer-Encoding: base64";
$mail_header .= "\nContent-Disposition: attachment; filename=\"".$pic."\"";
$mail_header .= "\n\n".$file;
mail("$email","$betreff","",$mail_header);
echo "$email <p>";
};
allerdings bekomme ich den inhalt von
PHP-Code:
$mail_header
Kann einer hier einen fehler finden?!?
Für Eure hilfe wäre ich wirklich sehr dankbar (aber dennoch braucht ihr keine Bankverbindung angeben )
Gruß Manfred
Kommentar