code: def new_message(cls, from_user, to_users, subject, content):
          
          thread = Thread.objects.create(subject=subject)
          for user in to_users:
              thread.userthread_set.create(user=user, deleted=False, unread=True)
          thread.userthread_set.create(user=from_user, deleted=True, unread=False)
          msg = cls.objects.create(thread=thread, sender=from_user, content=content)
          message_sent.send(sender=cls, message=msg, thread=thread, reply=False)
          return msg
docs: Create a new Message and Thread.
  
          Mark thread as unread for all recipients, and
          mark thread as read and deleted from inbox by creator.