J'ai adapté le code du fichier sendmail.php autrement:
1 2
| $html=("webmail2.html");
$mail->Body=$html; |
Le fichier html ne génére plus d'erreur mais il me dis.
Warning: mail() expects parameter 3 to be string, object given in D:\www\delightfactory.eu\htdocs\MAIL\send_mail.php on line 10
Le message n'a pu être envoyé
la ligne 10 est celle-ci:
if(mail('info@delightfactory.eu', 'Proposition du porjet', $mail, $headers))
Et voici sendmail.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <?php
$headers ='From: "Office - Delight FACTORY"<office@delightfactory.eu>'."\n";
$headers .='Reply-To: office@delightfactory.eu'."\n";
$headers .='Content-Type: text/html; charset="iso-8859-1"'."\n";
$headers .='Content-Transfer-Encoding: 8bit';
$html=("webmail2.html");
$mail->Body=$html;
if(mail('info@delightfactory.eu', 'Proposition du porjet', $mail, $headers))
{
echo 'Le message a été envoyé';
}
else
{
echo 'Le message n\'a pu être envoyé';
}
?> |
Partager