Documentation: https://developers.google.com/apps-script/reference/gmail/gmail-message#replybody-options
When it tracks an email that doesn't have a response after the initial email, reply() goes to itself, given that I'm the one who sent the last email.
So, for example, client A sends an email to client B. Client A runs the script below, and the response is sent to client A, but it should go to client B as it only tracks, since there was no initial response from B. At least how this happens in the Gmail interface. I want to send a report.
I could start a separate sendmail, but this will start a new thread if you cannot specify a header in the response message or the user answered an existing thread that they don’t have in my case.
Code example:
message.reply("incapable of HTML", { htmlBody: "<b>some HTML body text</b>", replyTo: theirEmailAddress, });
However, replyTo actually just indicates the response to part of the message being sent, so the response we receive. This has nothing to do with the actual field to aka recipient.
If I do replyAll then the header for the email is:
from: me@me.com to: them@them.com cc: me@me.com
So, from this I get a bunch of letters from myself. I tried to specify cc as nobody, but that did not change the cc field.
threads[0].replyAll("Just wanted to follow up and see if you got my last email.", { htmlBody: followUpText, cc: null, });
How do I track email and send it to the original recipient of the last message?