Hi!
Danke nochmals...
Ich verzweifle bald.. funktioniert immernoch nicht. Irgendwo ist hier noch der Wurm drin. Kannst jemand hier nochmals einen blick draufwerfen? Danke viiiiiiel mals!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>EM2008 - Flyer und Plakate günstig drucken - Bestätigung
</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
$file=$_GET['file1']; //Das ist doch ok, wenn ich auf der vorhergehenden seite ein <input type="file" name="file1" > hatte?
$file_name = $_FILES["file1"]["name"];
$from = "bla@bla.de";
$strEmpfaenger="bla2@bla.de";
$strSubject="subject";
$strMailtext="Wird oben genauer definiert";
$boundary = strtoupper(md5(uniqid(time())));
$mail_header = "From:Test <$from>\n";
$mail_header .= "MIME-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$message";
$file_content = fread(fopen($file,"r"),filesize($file));
$file_content = chunk_split(base64_encode($file_content), 76, "\n");
$mail_header .= "\n--$boundary";
$mail_header .= "\nContent-Type: application/octetstream; name="$file_name"";
$mail_header .= "\nContent-Transfer-Encoding: base64";
$mail_header .= "\nContent-Disposition: attachment; filename="$file_name"";
$mail_header .= "\n\n$file_content";
$mail_header .= "\n--$boundary--";
mail($strEmpfaenger,$strSubject,$strMailtext,$mail_header);
or die("Die Mail konnte nicht versendet werden.");
echo " <table><tr>
<td>ALLES OK</td>
<td> </td>
<td> </td>
</tr></table>";
?>
</body>
</html>
Und nochmals: DANKE!