diff --git a/code/web/private_php/ams/autoload/mail_handler.php b/code/web/private_php/ams/autoload/mail_handler.php index c57b93250..643b57076 100644 --- a/code/web/private_php/ams/autoload/mail_handler.php +++ b/code/web/private_php/ams/autoload/mail_handler.php @@ -122,6 +122,7 @@ class Mail_Handler{ $id_user = $recipient; $recipient = NULL; } + $db = new DBLayer($db); $db->insert("email", array('Recipient' => $recipient, 'Subject' => $subject, 'Body' => $body, 'Status' => 'NEW', 'Attempts'=> 0, 'Sender' => $from,'UserId' => $id_user, 'MessageId' => 0, 'TicketId'=> $ticket_id)); }