Пример #1
0
 protected function updateSesMessageId($message)
 {
     // Get the SentEmail object
     $headers = $message->getHeaders();
     $hash = $headers->get('X-Mailer-Hash')->getFieldBody();
     $sent_email = SentEmail::where('hash', $hash)->first();
     // Get info about the
     $sent_email->message_id = $headers->get('X-SES-Message-ID')->getFieldBody();
     $sent_email->save();
 }
Пример #2
0
 /**
  * Show Email.
  *
  * @return \Illuminate\Http\Response
  */
 public function getShowEmail($id)
 {
     $email = SentEmail::where('id', $id)->first();
     return \View('emailTrakingViews::show')->with('email', $email);
 }
Пример #3
0
 public function process_complaint($message)
 {
     $message_id = $message->mail->messageId;
     $sent_email = SentEmail::where('message_id', $message_id)->first();
     if ($sent_email) {
         $meta = $sent_email->meta;
         $meta->put('complaint', true);
         $meta->put('success', false);
         $meta->put('complaint_time', $message->complaint->timestamp);
         if (!empty($message->complaint->complaintFeedbackType)) {
             $meta->put('complaint_type', $message->complaint->complaintFeedbackType);
         }
         $sent_email->meta = $meta;
         $sent_email->save();
     }
 }