$
$@|bot
Bekanntes Mitglied
- Dabei seit
- 17.02.2007
- Beiträge
- 974
- Reaktionspunkte
- 0
kannst du mir das nicht shcnell machen!`?
bitte
bitte
<html>
<head>
</head>
<body>
<?php
$to = "EMPFÄNGER";
$from = "ABSENDER";
$subject = "BETREFF";
$message = "TEXT/INHALT";
mail( $to, $subject, $message, $from );
?>
</body>
</html>
";
$to = "EMPFÄNGER";
$from = "ABSENDER";
$subject = "BETREFF";
$message = "TEXT/INHALT";
$datei = "DATEI";
$dateiname = "QUELLE";
MailVersenden($to, "", "", $from, $subject, $message, $datei, $dateiname);
function MailVersenden($an, $cc, $bcc, $from, $betreff, $text, $datei, $dateiname) {
$email_subject = $betreff; // The Subject of the email
// $email_to = ""; // Who the email is too
$headers = "From: ".$from;
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
$headers .= "\nMIME-Version: 1.0\n" .
"Content-Type: multipart/mixed;\n" .
" boundary=\"{$mime_boundary}\"";
$email_message .= "This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type:text/plain; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
$text . "\n\n";
if (is_array($datei)) {
foreach($datei AS $key => $value) {
if (file_exists($value)) {
$fileatt = $value; // Path to the file
$fileatt_type = "application/octet-stream"; // File Type
if ($dateiname[$key]) {
$fileatt_name = $dateiname[$key];// Filename that will be used for the file as the attachment
}else{
$fileatt_name = basename($value);
}
$file = fopen($fileatt,'rb');
$data = fread($file,filesize($fileatt));
fclose($file);
$data = chunk_split(base64_encode($data));
$email_message .= "--{$mime_boundary}\n" .
"Content-Type: {$fileatt_type};\n" .
" name=\"{$fileatt_name}\"\n" .
"Content-Disposition: attachment;\n" .
" filename=\"{$fileatt_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$data . "\n\n";
$a++;
if ($a == count($datei)) {
$email_message .= "--{$mime_boundary}--\n\n";
}else{
$email_message .= "--{$mime_boundary}\n";
}
unset($data);
unset($file);
unset($fileatt);
unset($fileatt_type);
unset($fileatt_name);
}
}
}elseif($datei) {
if (file_exists($datei)) {
$fileatt = $datei; // Path to the file
$fileatt_type = "application/octet-stream"; // File Type
if ($dateiname) {
$fileatt_name = $dateiname; // Filename that will be used for the file as the attachment
}else{
$fileatt_name = basename($datei);
}
$file = fopen($fileatt,'rb');
$data = fread($file,filesize($fileatt));
fclose($file);
$data = chunk_split(base64_encode($data));
$email_message .= "--{$mime_boundary}\n" .
"Content-Type: {$fileatt_type};\n" .
" name=\"{$fileatt_name}\"\n" .
//"Content-Disposition: attachment;\n" .
//" filename=\"{$fileatt_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$data . "\n\n" .
"--{$mime_boundary}--\n";
unset($data);
unset($file);
unset($fileatt);
unset($fileatt_type);
unset($fileatt_name);
}
}
$ok = @mail($an, $email_subject, $email_message, $headers);
echo "OK: $ok";
}
$value) { if (file_exists($value)) { $fileatt = $value; // Path to the file $fileatt_type = "application/octet-stream"; // File Type if ($dateiname[$key]) { $fileatt_name = $dateiname[$key];// Filename that will be used for the file as the attachment }else{ $fileatt_name = basename($value); } $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); $data = chunk_split(base64_encode($data)); $email_message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . "Content-Disposition: attachment;\n" . " filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; $a++; if ($a == count($datei)) { $email_message .= "--{$mime_boundary}--\n\n"; }else{ $email_message .= "--{$mime_boundary}\n"; } unset($data); unset($file); unset($fileatt); unset($fileatt_type); unset($fileatt_name); } } }elseif($datei) { if (file_exists($datei)) { $fileatt = $datei; // Path to the file $fileatt_type = "application/octet-stream"; // File Type if ($dateiname) { $fileatt_name = $dateiname; // Filename that will be used for the file as the attachment }else{ $fileatt_name = basename($datei); } $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); $data = chunk_split(base64_encode($data)); $email_message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . //"Content-Disposition: attachment;\n" . //" filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n" . "--{$mime_boundary}--\n"; unset($data); unset($file); unset($fileatt); unset($fileatt_type); unset($fileatt_name); } } $ok = @mail($an, $email_subject, $email_message, $headers); echo "OK: $ok"; } ?>
Du hast den Code doch nicht etwa komplett in eine Zeile geschrieben!?funzt trozdem net -.-
Code:$value) { if (file_exists($value)) { $fileatt = $value; // Path to the file $fileatt_type = "application/octet-stream"; // File Type if ($dateiname[$key]) { $fileatt_name = $dateiname[$key];// Filename that will be used for the file as the attachment }else{ $fileatt_name = basename($value); } $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); $data = chunk_split(base64_encode($data)); $email_message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . "Content-Disposition: attachment;\n" . " filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; $a++; if ($a == count($datei)) { $email_message .= "--{$mime_boundary}--\n\n"; }else{ $email_message .= "--{$mime_boundary}\n"; } unset($data); unset($file); unset($fileatt); unset($fileatt_type); unset($fileatt_name); } } }elseif($datei) { if (file_exists($datei)) { $fileatt = $datei; // Path to the file $fileatt_type = "application/octet-stream"; // File Type if ($dateiname) { $fileatt_name = $dateiname; // Filename that will be used for the file as the attachment }else{ $fileatt_name = basename($datei); } $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); $data = chunk_split(base64_encode($data)); $email_message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . //"Content-Disposition: attachment;\n" . //" filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n" . "--{$mime_boundary}--\n"; unset($data); unset($file); unset($fileatt); unset($fileatt_type); unset($fileatt_name); } } $ok = @mail($an, $email_subject, $email_message, $headers); echo "OK: $ok"; } ?>
Hey Max, jetzt wo niemand so wirklich weiß ob Duke Nukem 4ever noch kommt... könntest Du das nicht schnell programmieren?Aha. Fehlermeldung?
Ich nicht - aber unser Spambot vielleicht. Und an diesen wende ich jetzt auch meine Bitte, nicht alles in eine Zeile zu schreiben.Du hast den Code doch nicht etwa komplett in eine Zeile geschrieben!?
$fileatt = $value; // Path to the file $fileatt_type = "application/octet-stream"; // File Type
$value) { if (file_exists($value)) { $fileatt = $value; // Path to the file $fileatt_type = "application/octet-stream"; // File Type if ($dateiname[$key]) { $fileatt_name = $dateiname[$key];// Filename that will be used for the file as the attachment }else{ $fileatt_name = basename($value); } $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); $data = chunk_split(base64_encode($data)); $email_message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . "Content-Disposition: attachment;\n" . " filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; $a++; if ($a == count($datei)) { $email_message .= "--{$mime_boundary}--\n\n"; }else{ $email_message .= "--{$mime_boundary}\n"; } unset($data); unset($file); unset($fileatt); unset($fileatt_type); unset($fileatt_name); } } }elseif($datei) { if (file_exists($datei)) { $fileatt = $datei; // Path to the file $fileatt_type = "application/octet-stream"; // File Type if ($dateiname) { $fileatt_name = $dateiname; // Filename that will be used for the file as the attachment }else{ $fileatt_name = basename($datei); } $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); $data = chunk_split(base64_encode($data)); $email_message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . //"Content-Disposition: attachment;\n" . //" filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n" . "--{$mime_boundary}--\n"; unset($data); unset($file); unset($fileatt); unset($fileatt_type); unset($fileatt_name); } } $ok = @mail($an, $email_subject, $email_message, $headers); echo "OK: $ok"; } ?>
$value) { if (file_exists($value)) { $fileatt = $value;
Nein. Ich setze nur Google ein...Hey Max, jetzt wo niemand so wirklich weiß ob Duke Nukem 4ever noch kommt... könntest Du das nicht schnell programmieren?
Ein Zötler oder doch ein LEGA?:skal:Im Ernst: Ist schön zu sehen, dass es noch hilfsbereite, geduldige Menschen gibt. :skal:
Die Fähigkeit unterscheidet den Fachinformatiker, respektiv den Programmierer vom DAU!Nein. Ich setze nur Google ein...
Ein Zötler oder doch ein LEGA?:skal:
Wäre ja noch schöner, wenn ihr uns jezt schon absichtlich Mühe machen würdet.:st:Danke klappt schon alles supa hab unabsichtlich was falsch geemacht
10000 Danke!
Das ist sicherlich Möglich. Siehe: http://www.ietf.org/rfc/rfc2822.txt Viel Spaß, sind ja nur 2858 Zeilen.:hal:wo ihr schon so schön am diskutieren seid, ich meine mal etwas über das verfälschen eines E-Mail Headers (auch Sende-Zeit) gelesen zu haben.