Exemple #1
0
 function __construct()
 {
     $ml = new MailingList4u();
     $ml->setName("kino");
     $ml->addEmail("*****@*****.**");
     $ml->addEmail("*****@*****.**");
     $this->mls["kino"] = $ml;
     $ml = new MailingList4u();
     $ml->setName("official");
     $ml->addEmail("*****@*****.**");
     $ml->addEmail("*****@*****.**");
     $ml->setEnabled(false);
     $ml->setReplyTo(ReplyTo4u::$MAILING_LIST);
     $this->mls["official"] = $ml;
 }
Exemple #2
0
 public function getMailingList($domainId, $mlName)
 {
     global $dbh, $domainID;
     global $firephp;
     $sql = self::$SELECT . " where `domain_id` = :domain_id and `name` = :name" . " order by `name`, `email`";
     $firephp->log($sql, 'sql');
     $sth = $dbh->prepare($sql);
     $sth->execute(array(':domain_id' => $domainId, ':name' => $mlName));
     $mls = array();
     $ml = null;
     while ($row = $sth->fetch()) {
         if ($ml == null) {
             $ml = new MailingList4u($row['name']);
             $ml->setEnabled($row['enabled'] != 0);
             //$ml->setEmailCount($row['memberCount']);
             $ml->setReplyTo($row['replyTo']);
         }
         $ml->addEmail($row['email']);
     }
     return $ml;
 }