Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Gmail OAuth Scopes

Currently RBuilder uses the gmail.compose scope which is classified as a "restricted" scope.

I assume this is because there's options to preview the email from RBuilder.

The big issue is this scope (being a restricted scope) triggers a CASA security assessment if you try to publish your app. This process looks to be a huge rigamaroll one more recurring cost. Not something our team wants to take on just for a dozen or so gmail users.

It would be really, really helpful if we could have an option to disable the PreviewInEmailClient and utilize just the gmail.send scope which is classified as "sensitive".

Microsoft OTOH seems to be fine. It's working and published and good to go.

Comments

  • Hi Dusten,

    Thanks for the feedback. We will take a look at adding control over the Gmail scope for a later release.

    Currently, you can manually alter the "SendScope" using the OnConnectionStart event.
    uses
    ppSMTPCustom, ppEmail, ppRESTMailGmail;

    ...

    begin
    TppEmail(Report.Email).OnConnectionStart := ehEmail_ConnectionStart;

    Report.EmailSettings.ConnectionSettings.WebMailSetup(...);

    Report.SendMail;
    end;

    procedure TForm1.ehEmail_ConnectionStart(Sender, aAuthenticator: TObject);
    begin
    TppRESTMailGmail(Sender).RESTBaseInfo.SendScope := 'https://www.googleapis.com/auth/gmail.send';

    end;
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
Sign In or Register to comment.