I am developing a sheets addon, which lets the user send an email. The send function is called when the user clicks a button in a dialog which issues a google.script.run execution which then calls a server function that calls MailApp.sendMail.
The app has the permission script.send_mail as described here and works fine for me (a 'project editor') whenever I run it from the dialog.
Now, I am trying to get the addon approved for the marketplace but the email does not send when triggered by the marketplace reviewer user - they definitely did try as I have a lot of logging. No error is thrown by the sendMail function. The email address they are using is valid and the same email will send when I trigger it from the editor.
I think it may be a permission problem - but I don't know what.
I would like to recreate this by having a non-owner install the addon, but AFAICT it is not possible to install the addon for a non-owner (without it being in the marketplace ofc).
An alternative API might be GmailApp.sendEmail(), but the addon doesn't need access to the users own emails so that would be unnecessary privilege.
If anyone has any suggestions they would be much appreciated.