Example #1
0
    def bcc(self):
        # type: () -> t.List[Contact]
        """Get the Contacts the message is bcced to

        Returns:
            t.List[Contact]: The contacts in the bcc field of the message
        """
        return [Contact(contact_schema, self._imap_client) for contact_schema in self._schema.bcc.all()]
Example #2
0
    def reply_to(self):
        # type: () -> t.List[Contact]
        """Get the Contacts the message is replied to

        Returns:
            t.List[Contact]: The contacts in the reply_to field of the message
        """
        return [Contact(contact_schema, self._imap_client) for contact_schema in self._schema.reply_to.all()]
Example #3
0
    def sender(self):
        # type: () -> Contact
        """Get the Contacts the message is sent from

        Returns:
            Contact: The contact in the sender field of the message
        """
        return Contact(self._schema.sender, self._imap_client)
Example #4
0
    def from_(self):
        # type: () -> Contact
        """Get the Contacts the message is addressed from

        Returns:
            Contact: The contact in the from field of the message
        """
        return Contact(self._schema.from_m, self._imap_client) if self._schema.from_m else None
Example #5
0
    def to(self):
        # type: () -> t.List[Contact]
        """Get the Contacts the message is addressed to

        Returns:
            t.List[Contact]: The contacts in the to field of the message
        """

        return [Contact(contact_schema, self._imap_client) for contact_schema in self._schema.base_message.to.all()]
Example #6
0
    def reply_to(self):
        # type: () -> t.List[Contact]
        """Get the Contacts the message is replied to

        These are the addresses the message is meant to be sent to if the client
        hits reply.

        Returns:
            t.List[Contact]: The contacts in the reply_to field of the message
        """
        return [Contact(contact_schema, self._imap_client) for contact_schema in self._schema.base_message.reply_to.all()]