send email on same thread.
See original GitHub issueI have received a successful response of a email using gmail.users.messages.send() which is like
{ "id": "1231212312", "labelIds": ["UNREAD", "SENT", "INBOX"], "threadId": "23123123" }
I need to send an email again to the same email address but on the same thread not as a new email i.e using thread id to send email.
Need Help!
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (2 by maintainers)
Top Results From Across the Web
How to send follow up emails in the same thread as previous ...
When you're creating a new email campaign, you see an option named "Send followup in the same thread". If this option is enabled, ......
Read more >How to send a second email to the same recipient when you ...
If you've sent an email to someone and then want to send another as part of the same conversation or "trail" (e.g. if...
Read more >Email threading and how to change your threading mode
Messages with the same subject line will be threaded together, only if the email recipients are the same. Messages will only thread by...
Read more >Is there any way to send an email in the same thread?
First thing, you need to set a Message-ID header in the MimeMessage object, in the exact format Gmail is expecting ("<anyidyouwant@domain.com>", ...
Read more >Email Thread - Meaning, How To Forward It, Best Practices
An email thread is a record that groups together all email replies for an email instead of showing all the emails individually and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Greetings! For support with the API, please go here: https://developers.google.com/gmail/api/support
Hi sudb97! I’m glad you have something working!
I am not sure we are doing the same so in case my needs can fit yours I add a metadata sample. It works for us with the following metadata (with some part redacted just in case).
In-Reply-To: < 20200226123023.10596.23989@gceworker1.c.redacted.internal*> References: < 20200226123023.10596.23989@gceworker1.c.redacted.internal*> Date: Wed, 26 Feb 2020 04:30:24 -0800 Message-ID: CAAe2CVM***redacted*****ny+=Q@mail.gmail.com
When I send the e-mail I do include “In-Reply-To” and “References”. This is the fake ID, and my first e-mail already “replies” to the fake id e-mail. The field Message-Id I don’t send, it is generated way after I send the “send e-mail” request. I assume the send request is not directly a send, so the e-mail doesn’t have a message-id until it is indeed sent in the server’s background (this is an assumption on why the send request doesn’t return the message-id).
This meta data above I got from the e-mail I sent in my GMAIL web ui message -> 3 vertical dots -> show-original
So the process was:
On the other hand, technically I assume that it works like this: I tell gmail that I have a (fake) local e-mail I am replying to with the fake id that may be currently deleted. I tell gmail that all e-mails I am sending are direct replies to that same fake local e-mail. GMail groups all these e-mails because they are related, they are a conversation to the fake e-mail, but they don’t have dependencies to each other except for the timestamps so Gmail groups them and sorts them by timestamp. I am not sure this is the case but it works for us like a charm!
If you send the first e-mail and want to use its message id you are doing it properly, but you will need to wait until the message-id is indeed generated which may not be immediate.
Of course you may dismiss this e-mail since it’s a workaround and you have your own workaround. Having the message-id in the send-email-request is what both of us would miss.
Best regards, Zorion
On Wed, Oct 28, 2020 at 7:44 AM sudb97 notifications@github.com wrote: