python - Gmail API reply to a thread with a new subject -
in gmail, when click "reply", have option "edit subject" if want reply , quote existing thread in new thread different subject.
i have managed send email either in new thread, or reply existing thread, have not figured out how achieve behaviour explained above.
i believe i'm looking "quote thread" functionality, not sure how achieve this.
below small code snippet context:
msg = mimemultipart() msg['to'] = "email.com" msg['from'] = "email.com msg['subject'] = "subject" msg.attach(mimetext(html, 'html')) body = {'raw': base64.urlsafe_b64encode(msg.as_string()), 'threadid': thread_id} service.users().messages().send(userid="me", body=body).execute()
edit: i'm trying achieve:
email 1; thread 1:
subject: subject1
hey dude how's everything
email 2; thread 1:
subject: subject1
yo dude,
y u no reply?
on tue, nov 3, 2015 @ 10:41 am, dude
| hey dude
| how's everything
email 3; thread 2:
subject: subject2
dude,
different subject make reply?
on tue, nov 3, 2015 @ 10:42 am, dude
| yo dude,
| y u no reply?
| | on tue, nov 3, 2015 @ 10:41 am, dude
| | hey dude
| | how's everything
changing subject of reply create new thread. not possible change subject of existing thread.
Comments
Post a Comment