When I get a certain type of email, I need it auto-forwarded to a certain address with a specific cover message. So I wrote a script that scans that inbox and uses the "forward" method to forward them on. Fine, works great, the message gets forwarded and the forwarded message shows in my Sent folder. But when I'm looking at my gmail Inbox, there's no sign the message was forwarded - it looks like there's only a single message in the thread.
Is there a way to have auto-forwarded messages show up in my Inbox view so that I can see this is working? (I feel like it should be possible since it does this automatically when I manually forward, just not when it's automated.)
There may be a few emails that slip through my filter and DON'T get forwarded, and I would like that to be obvious in my inbox so I can easily fix the problem. I did set it so that the script marks these forwarded emails as Read, which helps, but it's not ideal.
1 Answer 1
Someone answered this for me and I tried their solution and IT WORKED but by the time I got back here to respond I couldn't see their comment. So, thank you, whoever that was! And for anyone else with this issue, the solution was to include the forward-to email address within a cc or bcc. So my code now looks like this:
originalMessage.forward(forwardToThisAddress,{
cc: forwardToThisAddress, //have to do this so forwarded email shows in inbox
subject: "Secure message not received",