Envoyer email en php
                    
        
     
             
                    hiddouche
    
        
    
                    Messages postés
            
                
     
             
            28
        
            
                                    Statut
            Membre
                    
                -
                                     
arthezius Messages postés 3756 Statut Membre -
        arthezius Messages postés 3756 Statut Membre -
        Bonjour,
JE SUIS ENTRAIN D'ENVOYER UN MESSAGE EN UTILISANT LE PHP VOILA MON CODE DE MA PAGE "envoyer.php"
 
<?php
//destinataire :
$to = "hiddouche_simo@hotmail.fr";
   
// sujet :
$subject = "Un message en HTML";
   
// message :
$message = "
<html>
<head>
<title>Un message en HTML</title>
</head>
<body>
<p>On écrit son code HTML ici</p>
<table>
<tr>
<th>Par exemple</th><th>un tableau</th><th>avec</th><th>des données</th>
</tr>
<tr>
<td>Guillaume</td><td>3</td><td>Août</td><td>1970</td>
</tr>
<tr>
<td>Sandra</td><td>17</td><td>Août</td><td>1973</td>
</tr>
</table>
</body>
</html>";
   
// Pour envoyer du mail au format html, vous pouvez configurer le type content-type :
$headers = "MIME-Version: 1.0\r\n";
$headers .= "content-type: text/html; charset=iso-8859-1\r\n";
   
// D'autres en-têtes : errors, From cc's, bcc's, etc :
$headers .= "From: Alain <khona2007@hotmail.com>\r\n";
   
//envoi du mail :
mail($to, $subject, $message, $headers);
?>
MAIS CE CODE DONNE UN ERREUR VOILA L ERREUR
" Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\emailfonction.php on line 38 "
et j'arrive pas a solutionne merci de m'aider
                
            
                
    
    
    
        JE SUIS ENTRAIN D'ENVOYER UN MESSAGE EN UTILISANT LE PHP VOILA MON CODE DE MA PAGE "envoyer.php"
<?php
//destinataire :
$to = "hiddouche_simo@hotmail.fr";
// sujet :
$subject = "Un message en HTML";
// message :
$message = "
<html>
<head>
<title>Un message en HTML</title>
</head>
<body>
<p>On écrit son code HTML ici</p>
<table>
<tr>
<th>Par exemple</th><th>un tableau</th><th>avec</th><th>des données</th>
</tr>
<tr>
<td>Guillaume</td><td>3</td><td>Août</td><td>1970</td>
</tr>
<tr>
<td>Sandra</td><td>17</td><td>Août</td><td>1973</td>
</tr>
</table>
</body>
</html>";
// Pour envoyer du mail au format html, vous pouvez configurer le type content-type :
$headers = "MIME-Version: 1.0\r\n";
$headers .= "content-type: text/html; charset=iso-8859-1\r\n";
// D'autres en-têtes : errors, From cc's, bcc's, etc :
$headers .= "From: Alain <khona2007@hotmail.com>\r\n";
//envoi du mail :
mail($to, $subject, $message, $headers);
?>
MAIS CE CODE DONNE UN ERREUR VOILA L ERREUR
" Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\emailfonction.php on line 38 "
et j'arrive pas a solutionne merci de m'aider
        A voir également:         
- Envoyer email en php
- Comment creer un compte email - Guide
- Envoyer un sms en différé - Guide
- Mon email ✓ - Forum Mail
- Facebook piraté et adresse email changé - Guide
- Envoyer un mail en cci - Guide
