===== Question "mail () with php", by Florence a. ===== www.balivilla.fr I use mail function in php: Message successfully sent!

"); } else { echo("

Message delivery failed...

"); } ?> and this not work at gandi server (Message delivery failed...), please help me ASAP thank you ===== Answer, by Benoit L. ===== Hi i am not very good in english, but i have read some thing that is : for use the Mail function the host server is obliged to have a sendmail server. I dont know how to configure that type of server sorry! Else it may be possible to use an fai server with this function : function envoi($donnees) { $smtp =fsockopen($this->smtp,'25',$errno, $errstr, 30); if (!$smtp) { echo "ERREUR : $errno - $errstr
\n"; } else{ $envoi_mail ="HELO ".$this->site."\r\n"; $envoi_mail.="MAIL FROM:site.">\r\n"; foreach($this->destinataire as $dest) { $envoi_mail.="RCPT TO:<$dest>\r\n"; } $envoi_mail.="DATA\r\n"; $envoi_mail.= "MIME-Version: 1.0 \r\n"; $envoi_mail.= "Content-Type: text/html; charset=\"iso-8859-1\" "; $envoi_mail.="Content-Transfer-Encoding: 8bit"."\r\n"; foreach($this->destinataire as $dest) { $envoi_mail.="To:$dest\r\n" ; } include("model-mail.php"); $envoi_mail.=".\r\n"; $envoi_mail.="QUIT\r\n"; fwrite($smtp, $envoi_mail); echo fread($smtp,1000); echo $envoi_mail; } } Good luck ...