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