webdigi / GmailScheduler

Google app script system to allow gmail / google business apps users to schedule outgoing messages & to set messages to return to inbox
Other
102 stars 36 forks source link

Mail won't send for threads. #28

Closed likwidoxigen closed 4 years ago

likwidoxigen commented 8 years ago

If the reply is in a thread the scheduler will run and remove labels but not send the draft. It does work for brand new emails though.

ghost commented 6 years ago

So, it only works with new emails?

likwidoxigen commented 6 years ago

That's correct. I'm betting it has to do with the threading in gmail. Seems like the label gets attached to the top message and not the reply you're trying to queue.

ghost commented 6 years ago

What a pity! It's a deal breaker for me.

likwidoxigen commented 6 years ago

I patched it in my fork. My version is cut down from this (no sms, no options for what happens after a message is dispatched) but it uses the new functionality to treat a draft as a draft and send it so it works with threads. GScripts don't really work with source control so the method I used makes it all look like a new commit, but I don't have the time or tolerance to deal with that. The code hasn't been cleaned up yet, but it functions as expected. https://github.com/likwidoxigen/DelaySend

webdigi commented 6 years ago

@likwidoxigen - Awesome. Please also consider submitting a pull request if you know what specific change is required to fix this on the Webdigi version.

likwidoxigen commented 6 years ago

@webdigi My changes fundamentally modify the email send process (I use the new GmailDraft class) and break the existing config options. My handling of it at the moment is to simply Axe the functionality and hide the options since all I care about is send later. I don't know how to submit a patch without making fundamental changes to your programs processes. I'm happy to shoot some code over and share the explanation.