Exemple #1
0
 function findBySid($sid)
 {
     $skeyCol = $this->getDbAttrName("skey");
     $mail = new Sys_Model_Mail_log();
     //$select = $this->select()->where("$skeyCol=?",$sid);
     //echo $select;
     $mail->find("{$skeyCol}='{$sid}'");
     echo $mail->id;
     if (trim($mail->id) == '') {
         return false;
     }
     return $mail;
 }
Exemple #2
0
 /**
  * 
  * Enter บันทึกการส่ง email
  * @param App_Mail_Sender $mail
  * @return Sys_Model_Mail_log
  */
 function maillog(App_Mail_Sender $mail)
 {
     return 0;
     $outbox = new Sys_Model_Mail_log();
     $outbox->setSubject($mail->getSubject());
     $outbox->setReceiver(join(",", $mail->getReceivers()));
     $outbox->setSender($mail->getSender());
     $outbox->setBcc(join(",", $mail->getBCCs()));
     $outbox->setContent($mail->getBodyContent());
     $outbox->setTemplateId($mail->getTemplateId());
     $outbox->setReceiverId($mail->getReceiverId());
     $outbox->setReceiverType($mail->getReceiverType());
     $outbox->setSkey(uniqid());
     $outbox->setSenddate(new DateTime());
     return $outbox->save();
 }
Exemple #3
0
 /**
  * get Singleton  Sys_Model_Mail_log
  *
  * @return Sys_Model_Mail_log
  */
 public static function getObjectByID($id)
 {
     $obj = new Sys_Model_Mail_log();
     $obj->find($id);
     return $obj;
 }