par
2501gigi » 03 juil. 2006, 14:06
Voila j'ai un souci j'ai mon bon de commande que je voudrais envoyer par mail mais le soucis est que l'on ne peut pas mettre de php dans la fonction mail.
Voila mon code du mail que j'aimerais envoyer:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p> <?php echo $etatC ; ?> <?php echo $row_Recordset2['nomfac']; ?><?php echo $row_Recordset2['prenomfac']; ?>,</p>
<p>Merci d avoir passé commande chez<strong><br>
Conservez ce mail car il tient lieu de facture. </strong></p>
<table width="429" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="225">Commande n° <?php echo $row_Recordset3['ID']; ?></td>
<td width="204">du <?php echo $row_Recordset3['date']; ?></td>
</tr>
</table>
<br>
<table width="559" border="0" cellspacing="0">
<tr>
<td width="166"><div align="center">Désignation</div></td>
<td width="138"><div align="center">Prix Unitaire </div></td>
<td width="112"><div align="center">Quantité</div></td>
<td width="135"><div align="center">Prix Article </div></td>
</tr>
<tr>
<td>---------------------------</td>
<td>-----------------------</td>
<td>------------------</td>
<td>----------------------</td>
</tr>
<?php do { ?>
<tr>
<td><div align="center"><?php echo $row_Recordset4['nomArti']; ?></div></td>
<td><div align="center"><?php echo $row_Recordset4['prixUni']; ?></div></td>
<td><div align="center"><?php echo $row_Recordset4['Qu']; ?></div></td>
<td><div align="center"><?php echo $row_Recordset4['prixArti']; ?></div></td>
</tr>
<?php } while ($row_Recordset4 = mysql_fetch_assoc($Recordset4)); ?>
</table>
---------------------------------------------------------------------------------------------<br>
<table width="581" border="0" cellspacing="0">
<tr>
<td width="202"> </td>
<td width="375"><table width="284" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="118"><div align="center">Total T.T.C : </div></td>
<td width="166"><div align="center"><?php echo $row_Recordset3['totalcom']; ?> €</div></td>
</tr>
</table></td>
</tr>
</table>
<br>
<strong>Adresse de livraison :<br>
<br>
</strong>
<table width="559" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="195"><div align="center"><strong>NOM : </strong></div></td>
<td width="358"><div align="center"><?php echo $row_Recordset1['nom']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>PRENOM : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['prenom']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>ADRESSE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['adresse']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>CODE POSTAL : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['cp']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>VILLE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['ville']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>TELEPHONE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['tel']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>MAIL : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['mail']; ?></div></td>
</tr>
</table>
<br>
<strong>Adresse de facturation :<br>
<br>
</strong>
<table width="559" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="195"><div align="center"><strong>NOM : </strong></div></td>
<td width="358"><div align="center"><?php echo $row_Recordset2['nomfac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>PRENOM : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['prenomfac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>ADRESSE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['adressefac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>CODE POSTAL : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['cpfac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>VILLE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['villefac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>TELEPHONE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['telfac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>MAIL : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['mailfac']; ?></div></td>
</tr>
</table>
<strong></strong>
<p>Merci de votre visite, en espérant vous revoir bientôt. </p>
</body>
</html>
Voila surtout que le probleme sera de creer une ligne pour chaque article que contient le tableau.
Merci a tous et si quelqu'un à une soluce a me proposer.
Voila j'ai un souci j'ai mon bon de commande que je voudrais envoyer par mail mais le soucis est que l'on ne peut pas mettre de php dans la fonction mail.
Voila mon code du mail que j'aimerais envoyer:
[php]<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p> <?php echo $etatC ; ?> <?php echo $row_Recordset2['nomfac']; ?><?php echo $row_Recordset2['prenomfac']; ?>,</p>
<p>Merci d avoir passé commande chez<strong><br>
Conservez ce mail car il tient lieu de facture. </strong></p>
<table width="429" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="225">Commande n° <?php echo $row_Recordset3['ID']; ?></td>
<td width="204">du <?php echo $row_Recordset3['date']; ?></td>
</tr>
</table>
<br>
<table width="559" border="0" cellspacing="0">
<tr>
<td width="166"><div align="center">Désignation</div></td>
<td width="138"><div align="center">Prix Unitaire </div></td>
<td width="112"><div align="center">Quantité</div></td>
<td width="135"><div align="center">Prix Article </div></td>
</tr>
<tr>
<td>---------------------------</td>
<td>-----------------------</td>
<td>------------------</td>
<td>----------------------</td>
</tr>
<?php do { ?>
<tr>
<td><div align="center"><?php echo $row_Recordset4['nomArti']; ?></div></td>
<td><div align="center"><?php echo $row_Recordset4['prixUni']; ?></div></td>
<td><div align="center"><?php echo $row_Recordset4['Qu']; ?></div></td>
<td><div align="center"><?php echo $row_Recordset4['prixArti']; ?></div></td>
</tr>
<?php } while ($row_Recordset4 = mysql_fetch_assoc($Recordset4)); ?>
</table>
---------------------------------------------------------------------------------------------<br>
<table width="581" border="0" cellspacing="0">
<tr>
<td width="202"> </td>
<td width="375"><table width="284" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="118"><div align="center">Total T.T.C : </div></td>
<td width="166"><div align="center"><?php echo $row_Recordset3['totalcom']; ?> €</div></td>
</tr>
</table></td>
</tr>
</table>
<br>
<strong>Adresse de livraison :<br>
<br>
</strong>
<table width="559" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="195"><div align="center"><strong>NOM : </strong></div></td>
<td width="358"><div align="center"><?php echo $row_Recordset1['nom']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>PRENOM : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['prenom']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>ADRESSE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['adresse']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>CODE POSTAL : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['cp']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>VILLE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['ville']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>TELEPHONE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['tel']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>MAIL : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset1['mail']; ?></div></td>
</tr>
</table>
<br>
<strong>Adresse de facturation :<br>
<br>
</strong>
<table width="559" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="195"><div align="center"><strong>NOM : </strong></div></td>
<td width="358"><div align="center"><?php echo $row_Recordset2['nomfac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>PRENOM : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['prenomfac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>ADRESSE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['adressefac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>CODE POSTAL : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['cpfac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>VILLE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['villefac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>TELEPHONE : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['telfac']; ?></div></td>
</tr>
<tr>
<td><div align="center"><strong>MAIL : </strong></div></td>
<td><div align="center"><?php echo $row_Recordset2['mailfac']; ?></div></td>
</tr>
</table>
<strong></strong>
<p>Merci de votre visite, en espérant vous revoir bientôt. </p>
</body>
</html>[/php]
Voila surtout que le probleme sera de creer une ligne pour chaque article que contient le tableau.
Merci a tous et si quelqu'un à une soluce a me proposer.