New PlMailer based on Hermes code:
[platal.git] / include / newsletter.inc.php
index e62ecfa..426bc27 100644 (file)
@@ -307,7 +307,7 @@ class NewsLetter
       div.title { margin: 0ex 0ex 3ex 0ex; padding: 5ex 1ex 1ex 15ex;
           font-size: 130%; font-weight: bold; text-align: right; 
           background-color: #369; color: #fff;
-          background-image: url(http://carva.org/aymeric.augustin/images/poly_org_nl.png);
+          background-image: url(http://dev.m4x.org/images/logo_xorg_nl.png);
           background-repeat: no-repeat; background-position: 0.5ex 0.5ex; }
       div.intro { margin: 4ex 3ex; }
       div.lnk   { margin: 2ex 6ex;}
@@ -349,23 +349,22 @@ EOF;
     function sendTo($prenom, $nom, $login, $sex, $html)
     {
         global $globals;
-    require_once('diogenes/diogenes.hermes.inc.php');
 
-    $mailer = new HermesMailer();
-    $mailer->setFrom($globals->newsletter->from);
-    $mailer->setSubject($this->title(true));
-    $mailer->addTo("\"$prenom $nom\" <$login@{$globals->mail->domain}>");
+        $mailer = new PlMailer();
+        $mailer->setFrom($globals->newsletter->from);
+        $mailer->setSubject($this->title(true));
+        $mailer->addTo("\"$prenom $nom\" <$login@{$globals->mail->domain}>");
         if (!empty($globals->newsletter->replyto)) {
             $mailer->addHeader('Reply-To',$globals->newsletter->replyto);
         }
         if (!empty($globals->newsletter->retpath)) {
             $mailer->addHeader('Return-Path',$globals->newsletter->retpath);
         }
-    $mailer->setTxtBody($this->toText($prenom,$nom,$sex));
-    if ($html) {
-        $mailer->setHTMLBody($this->toHtml($prenom,$nom,$sex,true));
-    }
-    $mailer->send();
+        $mailer->setTxtBody($this->toText($prenom,$nom,$sex));
+        if ($html) {
+            $mailer->setHTMLBody($this->toHtml($prenom,$nom,$sex,true));
+        }
+        $mailer->send();
     }
 
     // }}}