//Autres auteurs : *@author David Delon *@copyright Tela-Botanica 2000-2007 *@version $Revision: 1.1 $ $Date: 2007-09-06 08:39:41 $ // +------------------------------------------------------------------------------------------------------+ */ // +------------------------------------------------------------------------------------------------------+ // | ENTETE du PROGRAMME | // +------------------------------------------------------------------------------------------------------+ include_once 'configuration/bottin.config.inc.php'; include_once 'Mail.php' ; include_once 'Mail/mime.php' ; // +------------------------------------------------------------------------------------------------------+ // | CORPS du PROGRAMME | // +------------------------------------------------------------------------------------------------------+ // On recupere la ou les differentes configurations d inscription echo 'Bottin : envoi de la lettre d\'actualité'."\n"; $requete = 'select * from inscription_configuration'; $resultat = $GLOBALS['ins_db']->query($requete); if (DB::isError($resultat)) echo $resultat->getMessage(); $mail = & Mail::factory ('mail') ; while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { if ($ligne->ic_mail_news_url != '' && $ligne->ic_mail_news != '') { $lettre_info_html = file_get_contents($ligne->ic_mail_news_url); $crlf="\n"; $headers ['From'] = $ligne->ic_mail_news_from ; $headers ['Subject'] = $ligne->ic_mail_news_sujet ; $headers ['Reply-To'] = $ligne->ic_mail_news_reply_to ; $mime = new Mail_mime($crlf); $mime->setHTMLBody($lettre_info_html); $body = $mime->get(); $headers = $mime->headers($headers); $retour = $mail -> send ($ligne->ic_mail_news, $headers, $body) ; echo 'Envoi d\'un mail à : '.$ligne->ic_mail_news."\n"; if (PEAR::isError ($retour)) { echo 'erreur d\'envoi' ; } } } /* +--Fin du code ----------------------------------------------------------------------------------------+ * * $Log: not supported by cvs2svn $ * +-- Fin du code ----------------------------------------------------------------------------------------+ */ ?>