SharePoint Communication Sites - "Send by email" settings

Brass Contributor

Hello,

 

In th new communication sites you have that "Send by email" on top of every news/page.

Is it possible to control it somehow via the settings?

 

Apparently it is possible to email a news to an External User and we want to avoid that.

Even if the external user cannot open the link in the email, they can see a preview of the page/news.

 

Thanks for your feedback,

Best regards,

28 Replies
Sorry, but this is something you cannot achieve today in Communications sites

Hello @Juan Carlos González Martín

 

Is it still not possible to configure this setting?

The "Send by email" bar is taking unnecessary space at the top of the site.

 

Thanks for your help

maybe you could zap it with css as a grubby workaround?

Anyone find a way to disable this "Send by Email" button?

This is a HUGE SECURITY FLAW. Why is Microsoft not addressing this????

Because this 'feature' that you cannot disable (without a hack or creating your own page type) literally parses the page and adds a snippet of the content to the email bypassing all security in place.  I understand that as a user they can simply copy and paste the contents a of page and email them, but that requires effort and a strong understanding of what they are doing as well as giving the end user a chance to filter and/or remove content.   

 

What if your sharing the page with an external user?  Now they can just click the button, enter an email address... any email address, and send content from your page to anyone.   Its pretty amazing that this hasn't been addressed yet.

I think you are overstating the degree of difficulty of copy and paste.

 

Which reduces the severity of the built-in email the page feature.

Agree that we should get more control on this feature. There should be an option to prevent users from sharing with external users. You could look into Exchange, find a way to capture these emails and block them when they are being sent to external users. Not sure if it's possible, but without any controls in SharePoint, that's the first place where I would look for a solution.

I have built a small web-part that can be put an a modern page and offers the ability to hide some predefined elements (Office 365 Launcher Bar, Share Site, Send by Email, and the Footer) as well as adding any other elements which can be selected using a querySelector query.  Anyone is welcome to use and/or modify it.

 

https://github.com/fuzion9/spfxExternalSiteShareCleaner

Perhaps if someone sets out with the idea to share content then absolutely, it is not rocket science to cut/paste, however, those buttons just sitting there, staring at you are enough to put the idea in someones head.  "Hey, why don't I share this with page with ..."

 

Out of sight, out of mind... :)

Hi Dave,

 

Where would you paste your code on the modern page? I cannot seem to figure out how to do so. @Dave Field 

@justynagee 

 

Hi - this is the source code for building a Sharepoint app.  You will need to follow the instructions on this site: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-p...

 

I'm sorry I can't be of more help right now.

 

Thanks,

Dave

 

 

So my manager approached me yesterday about this button, asking if we could disable it. Official answer from MS is "no."

 

So I whipped up this quick Application Customizer Extension. As the page loads it checks for the button, and replaces it with an empty div. It's a bit of a hack job, but appears to be working so far. Biggest downside is it needs to be installed to each site collection individually. And if MS ever changes the name of the actual button element, it'll have to be updated.

 

export default class RemoveSendByEmailButtonApplicationCustomizer extends BaseApplicationCustomizer<IRemoveSendByEmailButtonApplicationCustomizerProperties> {
  private maxRetries: number = 20;
  private retries: number = 0;
  @override
  public onInit(): Promise<void> {
    document.onreadystatechange = () => {
      if(document.readyState === 'complete') {
        this._hideButton();
      }
    };
   
    return Promise.resolve();
  }

  private _hideButton(): void {
    if(this.retries < this.maxRetries) {
      this.retries++;
      setTimeout(() => {
        let buttonElements: NodeListOf<HTMLElement> = document.getElementsByName("Send by email");
        if(buttonElements.length > 0 ) {
          for(var i = 0; i < buttonElements.length; i++) {
            buttonElements.item(i).parentElement.innerHTML = "<div></div>";
          }
        } else {
          this._hideButton();
        }
      }, 100);
    }
  }

}

@Robert Hovorka

Looking at your code, regarding the removal of the 'Send by Email' button, in Sharepoint 365; where does that code, get fitted in, on the site-page? Do I need a special webpart, for it?

 

It is a real pain that there is no solution for the 'Send by EMail' link, which keeps appearing on site pages, in Sharepoint 365.

 

It is definately, a drawback!

 

 

Regards,

 

Dan

@Andrea Mondello 

Did you ever get a solution, to this problem, in Sharepoint 365?

 

It is a major flaw!

 

Regards,

 

Dan

 

@Don00135 

It is a custom module that can be installed to a site. I created a new module using SPFx and this was the code I put in it.

 

Overview of SPFx if you are not familiar with it:

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview

 

The specific module type was "Application customizer" extension

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/overview-extensions

@Robert Hovorka Thank you for our reply, to my message.

I have just being trying to get familiar, with the Sharepoint Framework and the Helloworld example.

Is such a basic example, as HelloWorld, adequate, so that your code could be embedded and applied, to hide the 'Send by Email' button.

The 'Helloworld' example is quite lengthy, but, very interesting.

 

Regards,

 

Dan

 

@Don0011595 I believe the HelloWorld example is a webpart, which would not be sufficient for this purpose. The application extension is still a SharePoint module, but is a different template and has some different functionality and requirement.