G
Познакомьтесь с пентестом веб-приложений на практике в нашем новом бесплатном курсе
<?
$header = "Content-Type: text/html; charset=windows-1251\n";
$email = "адрес для отправки письма";
$tema = "тема письма";
$text = "<h3>Письмо в формате HTML</h3>
<table border=1><tr><td>Vj;tn</td><td>содержать</td><td>любой</td><td>
код</td>
</tr></table>";
mail($email, $tema, $text, $header);
?>
ini_set('SMTP','localhost');
ini_set('smtp_port','25');
<?PHP
$ToEmail = "Брейль Андрей<pite20@gmx.de>";
$Subject = "PHP ist toll Хорошо";
$Message = "Hallo Claudia!
sender war gerade auf deinen PHP-Seiten und
wollte dir sagen, dass sie ihm/ihr sehr gut
gefallen.
Wenn du mit ihm/ihr Kontakt aufnehmen
moechtest, benutze bitte die Adresse sendermail.
Хорошо";
$Headers = "From: Breil Andreas<breil-andreas@mail.ru>\n";
$Headers .= "Content-Type: text/html; charset=UTF-8\n";
$Headers .="Content-Transfer-Encoding: 8bit\n";
mail($ToEmail, $Subject, $Message, $Headers);
?>
<?PHP
if($senden){
$from = "breil-an@mail.ru";
$to = "pite20@gmx.de";
$subject = "testmail";
$message = "Name: ".$name."\nBeruf: ".$beruf."\nText: ".$text;
$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\nMultipart Nachricht";
$mail_header .= "\n--$boundary";
$mail_header .= "\nContent-Type: text/html";
$mail_header .= "\nContent-Transfer-Encoding: 8bit";
$mail_header .= "\n\n$message";
$file_content = fread(fopen($userfile,"r"),filesize($userfile));
$file_content = chunk_split(base64_encode($file_content));
$mail_header .= "\n--$boundary";
$mail_header .= "\nContent-Type: $userfile_type; name=\"$userfile_name\"";
$mail_header .= "\nContent-Transfer-Encoding: base64";
$mail_header .= "\nContent-Disposition: attachment; filename=\"$userfile_name\"";
$mail_header .= "\n\n$file_content";
$mail_header .= "\n--$boundary--";
mail($to,$subject,$message,$mail_header);
}
?>
<html>
<body>
<form method="post" action="mail6.php" enctype="multipart/form-data">
<table border=0 cellpadding=0 cellspacing=0 width="100%">
<tr>
<td>Name:</td>
<td><input type="text" name="name" size=30" /></td>
</tr>
<tr>
<td>Beruf:</td>
<td><input type="text" name="beruf" size=30" /></td>
</tr>
<tr>
<td>Text:</td>
<td><textarea cols=20 rows=5 name="text"></textarea></td>
</tr>
<tr>
<td>Foto:</td>
<td><input type="file" name="userfile" size=30" /></td>
</tr>
<tr>
<td colspan=2><input type="submit" name="senden" value="senden" /></td>
</tr>
</table>
</form>
</body>
</html>
$Headers .= "Content-Type: $userfile_type; name=\"=?utf-8?B?" . base64_encode($userfile_type) . "?=\"\r\n";
<?PHP
$FromName = "Брейль Андрюха";
$FromEmail = "breil-an@mail.ru";
$ToName = "Брейль Андрей";
$ToEmail = "pite20@gmx.de";
$Subject = "PHP ist toll Хорошо ÜÖÄ";
$Message = "Hallo Claudia! Хорошо ÜÖÄ";
$Charset = "UTF-8";
//mb_language("Ru"); // optional
mb_internal_encoding($Charset);
$From = mb_encode_mimeheader($FromName) . " <" . $FromEmail . ">";
$To = mb_encode_mimeheader($ToName) . " <" . $ToEmail . ">";
$Headers = "From: " . $From . "\r\n";
$Headers .= "Content-Type: text/html;\r\n";
mb_send_mail($To, $Subject, $Message, $Headers);
?>
Обучение наступательной кибербезопасности в игровой форме. Начать игру!