79
79
def get_message_addresses(message):
80
80
"""Get the origin and destination addresses of a message.
84
83
:return: A pair (from_email, to_emails), where from_email is the email
85
84
address in the From header, and to_emails a list of all the
86
85
addresses in the To, Cc, and Bcc headers.
90
89
for header in ['To', 'Cc', 'Bcc']:
94
91
to_emails = [ pair[1] for pair in
95
92
Utils.getaddresses(to_full_addresses) ]