Пример #1
0
 protected function sendEndMail($msg)
 {
     $recipients = Billrun_Factory::config()->getConfigValue('log.email.writerParams.to');
     if ($recipients) {
         Billrun_Util::sendMail("BillRun customer aggregate page finished", $msg, $recipients);
     }
 }
Пример #2
0
 /**
  * Send Email helper
  * @param type $subject the subject of the message.
  * @param type $body the body of the message
  * @param type $attachments (optional) Zend_Mime that hold the attachment files.
  * @return type
  */
 protected function sendMail($subject, $body, $recipients = array(), $attachments = array())
 {
     $recipients = $this->isDryRun ? array('eran', 'ofer') : array_merge($this->commonRecipients, $recipients);
     return Billrun_Util::sendMail($subject, $body, $recipients, $attachments);
 }
Пример #3
0
 /**
  * Send an  email alert on events that failed to notify the  remote RPC (CRM)
  * @param type $event the event that  was  suppose  to be passed to the RPC.
  * @param type $rpcRet the  remote rpc returned value
  */
 protected function sendEmailOnFailure($event, $rpcRet)
 {
     $msg = "Failed  when sending event to RPC" . PHP_EOL;
     $msg .= "Event : stamp : {$event['stamps'][0]} , imsi :  " . @$event['imsi'] . " ,  msisdn :  " . @$event['msisdn'] . PHP_EOL;
     $msg .= (isset($rpcRet['message']) ? "Message From RPC: " . $rpcRet['message'] : "No  failure  message  from the RPC.") . PHP_EOL;
     $tmpStr = "";
     foreach ($rpcRet as $key => $val) {
         $tmpStr .= " {$key} : {$val},";
     }
     $msg .= "RPC Result : " . $tmpStr . PHP_EOL;
     Billrun_Factory::log()->log($msg, Zend_Log::ALERT);
     return Billrun_Util::sendMail("Failed Fraud Alert, " . date(Billrun_Base::base_dateformat), $msg, Billrun_Factory::config()->getConfigValue('fraudAlert.failed_alerts.recipients', array()));
 }