I am trying to add cc in Gmail python API. So far I haven't seen any example on google. Here is what I tried in create_message
method:
def create_message(sender, to, subject, message_text, cc=None):
message = MIMEText(message_text,'html')
message['to'] = to
if cc:
message['cc'] = cc
message['from'] = sender
message['subject'] = subject
return {'raw': base64.urlsafe_b64encode(message.as_string())}
I looked through MIMEText.py
and discovery.py
but couldn't find anything. Thanks!