creamycewie
Mitglied
Ja, ich geb mir mal die Varriablen aus...
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
$empfaenger = 'max@example.com' . ', '; // beachten das Komma
$empfaenger .= 'moritz@example.com';
string(7476) "From: Test MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=067d1d8871f280cda0c9a39b620ae94f This is a multi-part message in MIME format --067d1d8871f280cda0c9a39b620ae94f Content-Type: text/plain Content-Transfer-Encoding: 8bit
Text
--067d1d8871f280cda0c9a39b620ae94f Content-Type: application/pdf; name=test.pdf Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=test.pdf JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29k ZT4+CnN0cmVhbQp4nI1YS28bNxC+61cQuXQJdDd8L+lbg6YF+giaxkCBJD34IcuuLdmxbAfwD8+5 M9wlZ2TTjmMIoTjvmY8zpL4INWgjFP6VxdF68WVhlRJh1GEIo1gvXPCxfr2YvgLHEEKEr8hL304X /4jNQovVzr6zqMHpIK6Xi5PnSO8XaohgK0ZUEbUIwVi063S0AnzMXM4HJ2xyWQNsBuP0rDpZYaOZ VHMR1FUIOxJK/AqfFUQdB4v/chr4+mgt3uwvXv89ouD+CUSHu1qY5IdkxOiC2F8vOiH3/wMuUB+R q7dhcFH01gwexI4Xn7qPsjeoN8VuKdGVoEx3LXsHmybE7kb2CunBp+5MYnTBuu5kZ7c33XmVPQBZ kALiv/u/ZdvGoe002CB6P05mP0jT3SLnndQg4n1A7l7HMIxG9JAU5ybOt7K34JDrVsh+Cewb+OD/ a9lrsG7BcaAIWGTba4lfwKc3YCM7dwGkYyRtQeoIPqdST5RrVIECWRKtHOJiKSfFN8iDQlfwucAv B1INKUVv/US8l16pKdBSCqPtEJ3oTZqTPFXBQOR/4PqHqSA2R8gqFzSKuTgOymHxPnV/y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CgpPj5lbmRv YmoKeHJlZgowIDEzCjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMTgzNyAwMDAwMCBuIAowMDAw MDA0MDgxIDAwMDAwIG4gCjAwMDAwMDE3NzggMDAwMDAgbiAKMDAwMDAwMTYzNiAwMDAwMCBuIAow MDAwMDAwMDE1IDAwMDAwIG4gCjAwMDAwMDE2MTYgMDAwMDAgbiAKMDAwMDAwMTk1MCAwMDAwMCBu IAowMDAwMDAyMDE2IDAwMDAwIG4gCjAwMDAwMDIwODUgMDAwMDAgbiAKMDAwMDAwMTkwMiAwMDAw MCBuIAowMDAwMDAyMTY1IDAwMDAwIG4gCjAwMDAwMDIyMjggMDAwMDAgbiAKdHJhaWxlcgo8PCAv U2l6ZSAxMyAvUm9vdCAxIDAgUiAvSW5mbyAyIDAgUgovSUQgWzxGODEyNjBENEE4MDg0ODIyRDcz NDQ2MzBFMUUzMjA4RD48RjgxMjYwRDRBODA4NDgyMkQ3MzQ0NjMwRTFFMzIwOEQ+XQo+PgpzdGFy dHhyZWYKNDUwNgolJUVPRgo= --067d1d8871f280cda0c9a39b620ae94f--"
<?php
error_reporting(E_ALL);
$empfaenger = "test2@meinedomain.at"; // Empfänger E-Mail Adresse
$betreff = "Test"; // Betreff
$dateiname = $_FILES['attachment']['tmp_name']; // Dateiname
$dateiname_mail = "test.pdf";
$id = md5(uniqid(time()));
$dateiinhalt = fread(fopen($dateiname, "r"), filesize($dateiname));
// Absender Name und E-Mail Adresse
$kopf = "From: Test<test@meinedomain.at>\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 .= "Test"; // Inhalt der E-Mail (Body)
$kopf .= "\n--$id";
// Content-Type: image/gif, image/jpeg, image/png
$kopf .= "\nContent-Type: application/pdf; 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
var_dump ($kopf);
//header ("Location: admin.php?page=5");
?>
error_reporting(E_ALL);
$empfaenger = "xxxx@xxx.de"; // eine gültige email angeben am besten deine eigene
$betreff = "Test"; // Betreff
$dateiname = "1.jpg"; // Dateiname und dateiname_mail identisch
$dateiname_mail = "1.jpg";
$id = md5(uniqid(time()));
$dateiinhalt = fread(fopen($dateiname, "r"), filesize($dateiname));
// Absender Name und E-Mail Adresse
$kopf = "From: Test<test@meinedomain.at>\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 .= "Test"; // Inhalt der E-Mail (Body)
$kopf .= "\n--$id";
// Content-Type: image/gif, image/jpeg, image/png
$kopf .= "\nContent-Type: application/pdf; 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
<?php
require_once('mail_anhang.php');
?>
<!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=utf-8" />
<title>Unbenanntes Dokument</title>
</head>
<body>
<?php
if(isset($scs_msg) && !empty($scs_msg)) {
echo $scs_msg; }?>
<form method="post" action="" enctype="multipart/form-data" name="mail_form">
<input type="file" name="attachment" /><br />
<br />
<input type="submit" value="absenden" name="submit_mail_form"/>
</form>
</body>
</html>
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
if(isset($_POST['submit_mail_form'])) {
echo "test2";
$empfaenger = "xxxx@xxxx.xx"; // Empfänger E-Mail Adresse
$betreff = "Test"; // Betreff
$dateiname = $_FILES['attachment']['tmp_name']; // Dateiname
$dateiname_mail = "testdatei";
$id = md5(uniqid(time()));
$dateiinhalt = fread(fopen($dateiname, "r"), filesize($dateiname));
// Absender Name und E-Mail Adresse
$kopf = "From: Test<test@meinedomain.at>\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 .= "Test"; // Inhalt der E-Mail (Body)
$kopf .= "\n--$id";
// Content-Type: image/gif, image/jpeg, image/png
$kopf .= "\nContent-Type: application/pdf; 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
$scs_msg ="Datei wurde gesendet";
}
?>