File "mail04.php"
Full Path: /home/analogde/www/filechange/WEBSITE/test/mail04.php
File size: 2.49 KB
MIME-type: text/x-php
Charset: utf-8
<?php
if(isset($_POST['mails']))
{ extract($_POST);
$table = explode("\n", $mails);
print_r($table);
$nbr = count($table);
$contenu = '';
$contenu .= '<p>';
for($i=0;$i < $nbr ;$i++)
{
$contenu .= $table[$i];
$contenu .= '</br>';
}
$contenu .= '<p>';
$to = 'patrice.delpy@neuf.fr'; //Specify Multiple Recipients
$sujet = 'Email';
$jour = date("d-m-Y");
$heure = date("H:i");
$entete = '<html>
<head>
<title></title>
</head>
<body> ';
$t1 = '';
$t1 .= '<table width="600" border="0">
<tr>
<td width="400"></td>
<td width="87">';
$t1 .= $jour .' ' .'a' .' ' .$heure;
$t1 .= '</td>
</tr>
<tr>
<td colspan="2">Votre message:</br>';
$t1 .= '<p>';
$t1 .= '<p>';
for($i=0;$i < $nbr ;$i++)
{
$t1 .= $table[$i];
$t1 .= '</br>';
}
$t1 .= '<p>';
$t1 .= '</td>';
$t1 .= '</tr>';
$t1 .= '</table>';
$fin = '</body>
</html>';
$message = $entete .$t1 .$fin;
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: patoche@analog-design.net>' . "\r\n"; //Specify Sender
//$headers .= 'Cc: user<user1@mail.com>' . "\r\n"; //Specify CC user
//$headers .= 'Bcc: user2<user2@mail.com>' . "\r\n"; //Specify Bcc User
mail($to, $sujet, $message, $headers);
/*
$to = 'patrice.delpy@neuf.fr'; //Specify Multiple Recipients
//$to .= 'user2@OtherDomain.com';
$subject = 'My PHP Email'; //Specify Email Subject
$message = '
<html>
<head>
<title></title>
</head>
<body>
<p>Hello Exabytes,</p>
<h2>My Testing HTML Email!</h2>
</body>
</html>
'; //Specify Email Message
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
//To send HTML mail, the Content-type header must be set
$headers .= 'From: Exabytes <user@MyDomain.com>' . "\r\n"; //Specify Sender
$headers .= 'Cc: user<user1@mail.com>' . "\r\n"; //Specify CC user
$headers .= 'Bcc: user2<user2@mail.com>' . "\r\n"; //Specify Bcc User
mail($to, $subject, $message, $headers); //sent it
*/
}
?>
<form method="post" action="#">
<textarea name="mails"></textarea>
<input type="submit" value="envoyer" />
</form>