Hi guys
i'm coding a little newsletter, i'm trying to send a pic with my page.html.. but no pic received !!
I d'ont understand how to send a pic with my file page.htm
I'm working on local and with easyphp
here the code :
include("commun/fonctions_file.php");
$data_html = file_get_contents('page.htm');
$site = 'www.myweb.net';
$mail_admin = 'contact@myweb.net';
$from="contact@myweb.net";
$subject = "Newsletter example.com - ".date("d.m.Y",mktime());
$entete = "From: $site<$mail_admin>n";
$entete .= "X-Sender: <$mail_admin>n";
$entete .= "X-Mailer: PHPn";
$entete .= "Return-Path: <$mail_admin>n";
$entete .= "Content-Type: text/html; charset=iso-8859-1n";
$format = 'HTML';
$subject = "Coucou!";
$sql = "SELECT email FROM test";
$req = mysql_query($sql);
// Sent of email
while ($data = mysql_fetch_array($req))
{
$a=mail($data['email'], $subject,$donnees_html,$entete);
{
echo "<center><b>".$data['email']." received email ! n";
}
}
Gracias
Merry christmas 😃