UTF-8 fixes
[platal.git] / include / massmailer.inc.php
index 79b0fa0..bffe88e 100644 (file)
@@ -59,7 +59,7 @@ abstract class MassMailer
             return $this->_head; 
         } else {
             $head = $this->_head;
-            $head = str_replace('<cher>',   $sexe ? 'Chère' : 'Cher', $head);
+            $head = str_replace('<cher>',   $sexe ? 'Chère' : 'Cher', $head);
             $head = str_replace('<prenom>', $prenom, $head);
             $head = str_replace('<nom>',    $nom,    $head);
             return format_text($head, $type, 2, 64);
@@ -121,7 +121,8 @@ abstract class MassMailer
 
     protected function getAllRecipients()
     {
-        return  "SELECT  u.user_id, a.alias,
+        global $globals;
+        return  "SELECT  u.user_id, CONCAT(a.alias, '@{$globals->mail->domain}'),
                          u.prenom, IF(u.nom_usage='', u.nom, u.nom_usage),
                          FIND_IN_SET('femme', u.flags),
                          q.core_mail_fmt AS pref, 0 AS hash
@@ -151,6 +152,7 @@ abstract class MassMailer
             XDB::execute("UPDATE  {$this->subscriptionTable()}
                              SET  last = {?}
                            WHERE " . implode(' OR ', $sent), $this->_id);
+            
             sleep(60);
         }
     }
@@ -255,5 +257,5 @@ function enriched_to_text($input,$html=false,$just=false,$indent=0,$width=68)
 
 // }}}
 
-// vim:set et sw=4 sts=4 sws=4:
+// vim:set et sw=4 sts=4 sws=4 enc=utf-8:
 ?>