1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
<?php
if( isset($_POST['mailform']) )
{
$message = htmlspecialchars($_POST['message']);
$email = tout les mails des utilisateur de ma bdd
$header="MIME-Version: 1.0\r\n";
$header.='From:"Zorkai.ML"<zorkaiyt@gmail.com>'."\n";
$header.='Content-Type:text/html; charset="uft-8"'."\n";
$header.='Content-Transfer-Encoding: 8bit';
ob_start();
?>
<html>
<body>
<div align="center">
<img src="http://www.primfx.com/mailing/banniere.png"/>
<br />
<?php echo htmlspecialchars($message);?>
<br />
<img src="http://www.primfx.com/mailing/separation.png"/>
</div>
</body>
</html>
<?php
$code = ob_get_contents();
mail($email, "Zorkai.ML - Newsletter", $code, $header);
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="letter.css">
<link href="https://fonts.googleapis.com/css?family=Poor+Story" rel="stylesheet">
</head>
<body>
<form method="post" action="">
<div align="center">
<p><textarea type="text" placeholder="Votre Message..." name="message" style="text-align: center" /></textarea></p>
<p><input type="submit" value="Envoyer !" name="mailform"/></p>
</div>
</form>
</body>
</html> |
Partager