I am using Gmail App script to auto forward my custom label emails to two different senders, but I am getting facing some problem which i want to discuss here.
At start of program, i am getting number of threads in that label than getting message and forwarding that message to two different emails, after that i am marking it as READ message and than removing its label. I used timely driven trigger for this code.
Let say a user "emailuser1" email arrived with custom label, and this user have previous five conversation, which are READ before and have no label (It means there are now One unread + Five read Emails of user “emailuser1”).
My program is which similar to the following program http://www.labnol.org/internet/auto-forward-gmail-messages/20665/
https://docs.google.com/spreadsheet/ccc?key=0Aofk8L6brI_edFUyaElHeDBKbVBJU3ppXzh1YjVTZUE
The problem is that, the program is sending 6 emails (1 unread + 5 read messages) instead of only 1 email. Next time when user “emailuser1” email comes, program will send 7 emails.
To avoid this multiple sent, I try a new technique by moving read and forwarded message to TRASH folder, But the problem is remain.
Also in Gmail General Settings, I marked conversion view to OFF.
Any idea how to solve this issue, I have searched a lot for different Gmail App commands functions, but was not getting correct response.
Thanks and Regards, leo