Example #1
0
    def __init__(self,
                 uid,
                 subject,
                 sender,
                 recipient,
                 headers,
                 read=None,
                 text_body=None,
                 html_body=None):
        self.uid = int(uid) if uid else None
        self.subject = subject
        self.sender = sender
        self.recipient = recipient
        self.headers = headers
        self.read = read

        self.text_body = text_body
        self.html_body = html_body

        if headers.get('Date', None):
            self.date = convert_date_str_to_date(date_str=headers['Date'])
        else:
            self.date = None

        self.headers = headers
Example #2
0
    def __init__(self, *args, **kwargs):
        self.date_sent = kwargs.pop('date_sent')

        if self.date_sent:
            self.date_sent = convert_date_str_to_date(self.date_sent)

        super(OutgoingMessage, self).__init__(*args, **kwargs)
Example #3
0
    def __init__(self, *args, **kwargs):
        self.date_sent = kwargs.pop('date_sent')

        if self.date_sent:
            self.date_sent = convert_date_str_to_date(self.date_sent)

        super(OutgoingMessage, self).__init__(*args, **kwargs)
Example #4
0
    def __init__(self, *args, **kwargs):
        # TODO: parse date and store in UTC
        self.date_sent = kwargs.pop('date_sent', None)
        self.date_received = kwargs.pop('date_received', None)

        if self.date_sent:
            self.date_sent = convert_date_str_to_date(self.date_sent)

        if self.date_received:
            self.date_received = convert_date_str_to_date(self.date_received)

        self.spf_signature = kwargs.pop('spf_signature', None)
        self.dkim_signature = kwargs.pop('dkim_signature', None)

        self.valid_spf_signature = kwargs.pop('valid_spf_signature', None)
        self.valid_dkim_signature = kwargs.pop('valid_dkim_signature', None)
        super(IncomingMessage, self).__init__(*args, **kwargs)
Example #5
0
    def __init__(self, *args, **kwargs):
        # TODO: parse date and store in UTC
        self.date_sent = kwargs.pop('date_sent', None)
        self.date_received = kwargs.pop('date_received', None)

        if self.date_sent:
            self.date_sent = convert_date_str_to_date(self.date_sent)

        if self.date_received:
            self.date_received = convert_date_str_to_date(self.date_received)

        self.spf_signature = kwargs.pop('spf_signature', None)
        self.dkim_signature = kwargs.pop('dkim_signature', None)

        self.valid_spf_signature = kwargs.pop('valid_spf_signature', None)
        self.valid_dkim_signature = kwargs.pop('valid_dkim_signature', None)
        super(IncomingMessage, self).__init__(*args, **kwargs)
Example #6
0
    def __init__(self, uid, subject, sender, recipient, headers, read=None,
                 text_body=None, html_body=None):
        self.uid = int(uid) if uid else None
        self.subject = subject
        self.sender = sender
        self.recipient = recipient
        self.headers = headers
        self.read = read

        self.text_body = text_body
        self.html_body = html_body

        if headers.get('Date', None):
            self.date = convert_date_str_to_date(date_str=headers['Date'])
        else:
            self.date = None

        self.headers = headers