public static function getByID($msgID, $mailbox = false)
 {
     $db = Loader::db();
     $row = $db->GetRow('select uAuthorID, msgDateCreated, msgID, msgSubject, msgBody, uToID from UserPrivateMessages where msgID = ?', array($msgID));
     if (!isset($row['msgID'])) {
         return false;
     }
     $upm = new UserPrivateMessage();
     $upm->setPropertiesFromArray($row);
     if ($mailbox) {
         // we add in some mailbox-specific attributes
         $row = $db->GetRow('select msgID, msgIsNew, msgIsUnread, msgMailboxID, msgIsReplied, uID from UserPrivateMessagesTo where msgID = ? and uID = ?', array($msgID, $mailbox->getMailboxUserID()));
         if (isset($row['msgID'])) {
             $upm->setPropertiesFromArray($row);
         }
         $upm->mailbox = $mailbox;
     }
     return $upm;
 }