python-o365
python-o365 copied to clipboard
CC email address not removed
when an email reply is created using message.reply() if there is a CC recipient in the initial message, then even if reply.cc.clear() is called (or reply.cc.remove(the-email-address) when reply.send() is executed it will send the email also to the initial CC address.
try this:
# ...
reply = message.reply(to_all=True)
reply.cc.clear()
reply.save()
reply.send()
PR submitted. No need to do save after the cc.clear. It should have been reply.save_message or reply.save_draft, but those are only needed if you want to save the draft for later.
Thanks! PR looks good. Merged