Example #1
0
def create_gmail_message(db_session, log, acct, folder, msg):
    """ Gmail-specific message creation logic. """

    new_uid = account.create_imap_message(db_session, log, acct, folder, msg)

    new_uid = add_gmail_attrs(db_session, log, new_uid, msg.flags, folder,
                              msg.g_thrid, msg.g_msgid, msg.g_labels,
                              msg.created)

    return new_uid
Example #2
0
def imap_create_message(db_session, log, acct, folder, msg):
    """ Message creation logic.

    Returns
    -------
    new_uid: inbox.models.backends.imap.ImapUid
        New db object, which links to new Message and Block objects through
        relationships. All new objects are uncommitted.
    """
    assert acct is not None and acct.namespace is not None

    new_uid = account.create_imap_message(db_session, log, acct, folder, msg)

    new_uid = add_attrs(db_session, log, new_uid, msg.flags, folder,
                        msg.created)
    return new_uid
Example #3
0
def imap_create_message(db_session, log, acct, folder, msg):
    """ Message creation logic.

    Returns
    -------
    new_uid: inbox.models.backends.imap.ImapUid
        New db object, which links to new Message and Block objects through
        relationships. All new objects are uncommitted.
    """
    assert acct is not None and acct.namespace is not None

    new_uid = account.create_imap_message(db_session, log, acct, folder, msg)

    new_uid = add_attrs(db_session, log, new_uid, msg.flags, folder,
                        msg.created)
    return new_uid