So I am writing a google apps script to automate a process with google sheets, what I am trying to do is reply to an email sent by me to someone else but when I do this:
var originalMessage = threads[0].getMessages()[0];
originalMessage.reply(message, {to: TargetEmail});
it basically just sends the reply to myself and the other person doesn't receive it because it only sends the email to the original sender (which is me) no matter what additional parameters i give it.
Is there a way that I can send the reply to the thread but to the targetEmail instead of myself?