Exemplo n.º 1
0
 public function __construct($options = array())
 {
     rb::connect();
     if (empty($options)) {
         $options = array('host' => conf::getMainIni('imap_host'), 'port' => conf::getMainIni('imap_port'), 'user' => conf::getMainIni('imap_user'), 'password' => conf::getMainIni('imap_password'), 'ssl' => conf::getMainIni('imap_ssl'));
     }
     $this->options = $options;
 }
Exemplo n.º 2
0
 /**
  * adds a mail to the queue
  * @param type $to
  * @param type $mime_headers
  * @param type $body
  * @return type
  */
 public static function add($to, $mime_headers, $body)
 {
     rb::connect();
     $bean = rb::getBean('mailerqueue');
     $bean->to = $to;
     $bean->mimeheaders = serialize($mime_headers);
     $bean->body = $body;
     $bean->sendtime = self::getDateTime();
     $bean->sent = 0;
     $bean->domain = helpers::getDomain($to);
     return R::store($bean);
 }