Microsoft Exchange and SharePoint are powerful platforms which form the base for collaboration in many organizations around the globe. Exchange provides email service and organizes inbound and outbound communication, while SharePoint offers a highly configurable system used primarily for storage and cooperation. The best part is that those two platforms get even more functionalities when you configure them to work together. Despite that, they often are treated as two separate beings and are not in any way connected. This article presents how to integrate these two services.
But first things first – what can you get from the Exchange 2016 and SharePoint 2016 integration?
Benefits of Exchange 2016 and Sharepoint 2016 integration
- Email alerts – it lets users and administrators track changes in documents and learn immediately whenever a new document is created or deleted. It is also possible to set email notifications to inform of any problems occurring on the SharePoint server
- Email-enabled library – SharePoint libraries can receive emails. This lets you save email and attachments directly in SharePoint by simply sending them to a library. The emails can also be sent from external addresses, as such a library has its own SMTP address.
- Calendar overlay – you can configure an Exchange calendar to be displayed directly on a SharePoint site.
- Site mailbox – this functionality is available starting from Exchange 2013 and SharePoint 2013. Site mailboxes counter the problem of emails and documents being in two different repositories. Thanks to this option, users can access emails and docs using one interface, either Outlook or a browser. This way, you can greatly improve productivity and collaboration by removing the need to jump from one interface to another. It also simplifies searching for specific items.
The following article is the part 1 on the topic of SharePoint and Exchange integration. In the first part, I will show you how to set up email alerts and email-enabled libraries. In part 2, I continue with instructions on how to display Exchange calendars in SharePoint (calendar overlay) and how to set up site mailboxes.
Environment set up
Below is the specification for the test environment I use in the article. If you want to make the integration process easier, you can copy this section and add information about your environment next to mine. This way, you could change this article into a personalized set of instructions.
- Domain name: local
- Domain controller: test.local with Windows Server 2016
- Windows Server 2016 with a stand-alone Exchange Server 2016 CU6 (Build 16.0.4573.1000) domain name: test.local
- Windows Server 2016 with a stand-alone SharePoint 2016 and SQL Server 2016 standard (Build 13.0.4001.0 Domain name:test.local
Setting up email alerts on Exchange and Sharepoint
This functionality is the easiest to set up, as it requires only two steps:
- Configuration of the outgoing SMTP server
- Alert configuration in a SharePoint library.
Configuration of the outgoing SMTP server
In SharePoint Central Administration go to System Settings.
In the new window, go to Configure outgoing email settings.
Now fill in the fields, pointing to your Exchange Server:
- Outbound SMTP Server – domain name or IP address of your Exchange server (test.local in my case).
- From address – specify the address which the notification recipient will see.
- Reply to address – if the recipient replies to the notification, this is the address to which this reply will go. Usually, admin’s address makes the most sense, but you could also use the address of an email-enabled library, configured in the further part of the article. It all depends on your needs and preferences.
- Use TLS connection encryption – here; you have to decide whether email sent to your Exchange Server should be encrypted. The default Exchange deployment has a self-signed certificate which is not trusted. For this option to work, you have to assign a trusted third-party certificate to the SMTP service or create your own Certificate Authority (CA) so that your self-signed certificates are trusted.
- SMTP server port – in most cases, you should input port 25, used for SMTP communication between mail servers.
- Character set – choose the right encoding, for example, UTF-8.
That is it – from the administrator’s point of view. Now users (and admins alike) can configure alerts according to their preferences.
Configuring alerts in SharePoint
Go to any SharePoint Library, and click Library to access its settings.
Click Alert Me > Set Alert on this Library on the ribbon.
In the new window, you can configure the settings for you alert:
- Alert Title – which will be included in the notification email.
- Send Alerts To – lets you choose who will receive notifications. Users can set up alerts only for their addresses.
- Delivery Method – the choice is between email and SMS.
- Change type – specifies when alerts should be sent – when documents are changed, added or deleted.
- Send Alerts for These Changes – if you choose to send notifications for any changes made in files, here you can limit their number. For example, you can limit them to when someone edits your documents.
- The last setting specifies when notifications should be sent. If you want to know there were any changes right away, choose Sent notification immediately.
Now that the alert is set, you can check if it works by adding a new document to the library.
A notification to firstname.lastname@example.org should be sent. Login to the admin’s mailbox to see if the alert reached the recipient.
Here, everything seems to be in order. I hope you are warmed up; the next part takes more time and effort.
Configure mail-enabled library in SharePoint
Configuring a mail-enabled library in SharePoint is a bit more complicated. I divided the required tasks into the following sections:
- Create an Organizational Unit (OU) in your AD. The OU will contain libraries as contact objects.
- Install and configure SMTP service on SharePoint.
- Adjust options in SharePoint Central Administration.
- Configure library to receive emails.
- Configure internal Exchange send connector to SharePoint
Setting up Organizational Unit in Active Directory
This step is required so that SharePoint can automatically create SMTP aliases. As a result, every time a library is configured to be mail-enabled, it will appear automatically in every Exchange Address Book, without the need to add anything manually. Please make sure that Windows SharePoint Timer Service account (email@example.com in my test environment) has the required permissions to the OU you create (Read, Write, Create and Delete permissions)
Installation and configuration of the SMTP service
Now, you need to install the SMTP service on your SharePoint server. In the Server Manager go to Add Roles and Features Wizard and from the available options choose SMTP Server.
Next, go to services.msc tab and change the SMTP service startup type to Automatic.
Open the Internet Information Services (IIS) 6.0 Manager, and go to the SMTP Server’s Properties. Go to Access > Authentication and make sure that Anonymous access is enabled:
For the purpose of this article, (to make it at least slightly more concise), I have not set any means of authentication. Keep in mind that this is a test environment and think twice before doing the same in your production environment. Also remember that if you choose any authentication methods here, you will need to configure authentication in Exchange later (I will mention this again in the right moment).
The next step is to set a domain for SharePoint and configure its address space. By default, an address space is in server_name.domain_name format, which would be sharepoint.test.local for this lab. To show you it is not the only option; I will use a custom domain, that is sharepoint.library.
Now, go back to the IIS 6.0 Manager and open the Domains section. That is where a new local domain can be created (in this example, as an alias to sharepoint.test.local).
Next, you need to set a drop directory – a physical location on the server, where the emails from Exchange will be saved. In this example, it is set to C:/Maildrop.
Now, create the folder you pointed to in the previous step. The last step in the configuration of the SMTP service is setting the right permissions to the folder for the SharePoint Timer Service account.
You can see the required permissions in the screenshot below.
That concludes the configuration of the SMPT service. I would recommend restarting the service to apply all changes immediately.
SharePoint Central Administration configuration
In SharePoint Central Administration go to System Settings > Configure incoming e-mail settings
In the new window, change the following settings:
- Enable sites on the server to receive e-mails – set it to yes,
- Setting Mode – change to Advanced
Now go to the Directory Management Service. This part of the configuration is connected with automatic AD contacts creation, which takes place when a mail-enabled library is created. Point to the previously configured OU. Change the remaining options to your liking.
Next, set the SMTP address space (the domain) and point to the drop directory from which SharePoint will get emails to the libraries. (Reminder: C:\Maildrop in this article).
Now you can go to the next step – creating mail-enabled libraries.
Configuring a mail-enabled library
Now that your SharePoint is ready to receive emails, you can finally configure a mail-enabled library. In this example, I will use the IT Documents library, created at the beginning of the article. Click on the chosen library, and a top menu will appear. In this menu, choose Library Settings
Then, click Incoming e-mail settings.
Now you can configure the library. The available options are as follows:
- SMTP address – in this example it is firstname.lastname@example.org
- Group attachments in folders – you can either save all attachments in the root folder or group them according to their sender or email subject. In this example, I choose not to group attachments, so that they will all appear in the root folder.
- Overwriting – with this option on, existing files are automatically overwritten when an attachment is sent with a name that already exists.
- Saving original e-mail – If you choose yes, emails and attachments will be saved as separate items.
- Invitations – Here, you decide whether to save meeting invitations.
- E-mail security policy – The last setting defines who can send emails to the mail-enabled library. Mind that checking the accept e-mail messages from any sender option can create a serious security loop and could open the library to spam.
That concludes the configuration on the SharePoint’s part. The next step is changing settings in your Exchange Server.
Configure send connector in Exchange Server
To make sure that emails sent by your users reach SharePoint (to be precise, @sharepoint library, in this example), you need to configure a send connector. To do that, run the Exchange Control Panel (ECP) and go to Mail Flow > Send connectors and click the plus icon to create a new connector.
Choose a name and set the connector type to internal:
In the next step, you need to point to the server which will route emails to @sharepoint.library. You can either use IP address or the name of your Exchange Server.
The next step is to set the authentication type to the previously configured SharePoint SMTP service. If you hadn’t checked any authentication method (like I did in this article), you should choose None. If you had chosen to authenticate communication, now you would need to configure how Exchange should go about it.
After those security settings, it is time to define address space to which the connector will route mail. Again, you should use the same domain you defined while setting the SMTP service in SharePoint.
As for the final step in this wizard, you will have to point to the Exchange source server.
You have just finished setting up both SharePoint and Exchange to support mail-enabled libraries. All that is left is to check if everything works out fine. First, let’s test if there is a contact object generated for the new library in the Organization Unit.
AD displays the library, which means that Directory Management Service in SharePoint is set up correctly. Email address of the library should appear in the Global Address List (GAL). If the address is not there, you can either wait for the GAL to update itself, or update it manually using PowerShell (this Microsoft article gives you detailed instructions on how to update GAL manually.)
The next test verifies how emails sent to the email-enabled library behave. I will send an email with an attachment to the address of the previously created library (email@example.com).
After several minutes, both the email and its attachment should appear in the library:
That ends the first part of the article on SharePoint and Exchange integration. This part included step by step instructions on how to configure email alerts and mail-enabled libraries on SharePoint. The second part of the SharePoint – Exchange integration is available here. It guides you through the process of configuring Exchange calendars to be displayed in SharePoint (calendar overlay) and setting up site mailboxes (Feature available in Exchange 2013 and SharePoint 2013 and newer.)