Example #1
0
 /**
  * @plugin ebi.Session
  * @param string $id
  * @param string $sess_data
  */
 public function session_write($id, $sess_data)
 {
     try {
         $obj = new self();
         $obj->id($id);
         $obj->data($sess_data);
         $obj->save();
     } catch (\Exception $e) {
     }
 }
Example #2
0
 private function collection($indexes)
 {
     $collection = new self();
     $collection->data($this->entitySet($indexes))->entity($this->entity)->indexes($this->indexes)->source($this->source());
     return $collection;
 }
Example #3
0
 /**
 	Sends directly to the Recipient MX, using $rctp MX for their domain
 	@param $rcpt = Recipeint
 	@param $from Sender (MAIL FROM)
 	@param $mail the Message Body
 */
 static function sendMX($from, $rcpt, $mail)
 {
     $ret = array();
     $res = self::getMX($rcpt);
     $mxs = array_keys($res);
     $sent = false;
     while ($sent == false) {
         // foreach ($res as $host) {
         $host = array_shift($mxs);
         $smtp = new self("tcp://{$host}:25");
         if ($res = $smtp->ehlo()) {
             $ret = array_merge($ret, $res);
         }
         if ($res = $smtp->mailFrom($from)) {
             $ret = array_merge($ret, $res);
         }
         if ($res = $smtp->rcptTo($rcpt)) {
             $ret = array_merge($ret, $res);
         }
         if ($res = $smtp->data($mail)) {
             $ret = array_merge($ret, $res);
         }
         if ($res = $smtp->quit()) {
             $ret = array_merge($ret, $res);
         }
         $sent = true;
     }
     return $ret;
 }