Пример #1
0
 /**
  * Try to find an email that has been recently sent
  * to the sender address within the past 60 minutes
  * 
  * This might not be fail proof, but lets see how we go
  * 
  * @param Mzax_Bounce_Message $message
  * @return Mzax_Emarketing_Model_Outbox_Email|NULL
  */
 public function detectRecientlySentEmail(Mzax_Bounce_Message $message)
 {
     $date = $message->getDate();
     $email = $message->getFrom();
     $emailId = Mage::getResourceSingleton('mzax_emarketing/outbox_email')->findRecentlySent($email, $date, 60);
     if ($emailId) {
         return Mage::getModel('mzax_emarketing/outbox_email')->load($emailId);
     }
     return null;
 }