I am creating chrome extension for gmail, I want send a mail when user click a button created by my extension. I am using inboxsdk for creating extension.
I am creating button using following code
InboxSDK.load('1', '**************').then(function(sdk){ // the SDK has been loaded, now do something with it! sdk.Compose.registerComposeViewHandler(function(composeView){ // a compose view has come into existence, do something with it! composeView.addButton({ title: "button-title-goes", iconUrl: 'https://image.ibb.co/mXS2ZU/images.png', onClick: function(event) { console.log( event ); event.composeView.insertHTMLIntoBodyAtCursor('<img src="https://image.ibb.co/mXS2ZU/images.png" alt="Smiley face" height="1" width="1">'); }, }); }); }); I want to send mail when user click on this button.
send(sendOptions)method of theComposeViewclass ofInboxSDK. The doc describes the above method asSimulates clicking the compose's send button.. Here is the link to it.