You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!!
I am trying to add a text to the body right before the send_message is executed. I am making the changes using the before send_message listener, but I don't see the change being reflected. Is there any way to do this?
The text was updated successfully, but these errors were encountered:
I don't think that's going to work (anymore). AFAIK 2 things have changed on Gmail's end:
scheduled/delayed send
how sending email (once sending is commenced) is actually implemented
First of all, I believe the send_message is only triggered once the actual email is being sent, not when the user clicks "send", and the default is that email sending is delayed slightly to allow a user to cancel sending, if they quickly discover something was wrong or the email was sent accidentally.
This will cause a disconnect in time between when the email-editor view is open and the sending of the actual email (and thus the triggering of the event) happens. This may be causing confusion on your end?
Secondly, the event-data has changed. In the olde days, gmail would send the entire mail as you clicked send, and we could (as I understand) intercept and modify the contents before the email was sent off.
Now the email contents is constantly passed off to the gmail-servers as the user authors it, and when you click "Send" gmail just instructs the server to send the message which is already uploaded.
This means that to modify the message "on send", you must:
intercept the click-event for the "send" button.
physically alter the message in the editor.
trigger a user-like event for the editor to make Gmail upload it to the server.
invoke the intercepted send-button event-handler
hope it works.
Not undoable... But nothing I have tried or even prototyped.
And it's clearly outside the scope of what Gmail.js plans to deliver of features.
If you want to do this, you're on your own... But feel free to share with the community how you did it!
Hi!!
I am trying to add a text to the body right before the send_message is executed. I am making the changes using the before send_message listener, but I don't see the change being reflected. Is there any way to do this?
The text was updated successfully, but these errors were encountered: