Hi,
Firstly I have to say what a great script this is.
I have been using it on my website for a while without an issue. I am now developing my wife's website and have an issue I hope you can help with.
The issue is when I send a message through her form the message she receives in gmail comes through as read.
Please could you suggest where I may have gone wrong?
Cheers.
@harbourart thanks for the feedback. That's quite strange. We've never seen this before. 🤷♂️
This could be a good question for StackOverflow where there are quite a few Google Developer Experts (GDEs)
who can help --> https://stackoverflow.com/questions/tagged/google-apps-script
Thanks for the reply. I will follow the link
@harbourart Just a guess but have you checked if there is any Filters on her Gmail account that apply the rule "mark as read"?
Gmail settings -> "Filters and Blocked Adresses"

See if there is a filter with "Do this: Mark as read" and change it or delete it.
There is another scenario where you are forwarding a copy of incoming mail to another address and have the option "mark ... Mail's copy as read" selected
Gmail settings -> "Forwarding and POP/IMAP"

If the option "mark ... Mail's copy as read" is selected and you want to keep forwarding the incoming mail, change it to "keep ... Mail's copy in the Inbox".
Thanks @cristianofromagio
Good shout I didn't think about that, I will investigate.
Hope the tips helped, and you were able to track it down! Feel free to let us/others know if you did figure it out too :)
Most helpful comment
@harbourart Just a guess but have you checked if there is any Filters on her Gmail account that apply the rule "mark as read"?
Gmail settings -> "Filters and Blocked Adresses"

See if there is a filter with "Do this: Mark as read" and change it or delete it.
There is another scenario where you are forwarding a copy of incoming mail to another address and have the option "mark ... Mail's copy as read" selected
Gmail settings -> "Forwarding and POP/IMAP"

If the option "mark ... Mail's copy as read" is selected and you want to keep forwarding the incoming mail, change it to "keep ... Mail's copy in the Inbox".