Monday, December 28, 2015

SharePoint Outgoing Email to Exchange

Setting up SharePoint 2013 single-server farm to connect to Exchange 2016.

After installing prerequisites in a new Windows Server 2012 R2 (and installing all available windows updates after installation failed first time) per https://technet.microsoft.com/EN-US/library/bb125224(v=exchg.160).aspx run Setup.exe per https://technet.microsoft.com/EN-US/library/bb124778(v=exchg.160).aspx

Needed to run setup.exe a few times due to failures connecting to the domain controller, each time it would pick up where it left off.

After a final reboot, open Exchange Management Shell from all apps.
To get the autodiscover.xml do:
Get-ClientAccessService | fl AutoDiscoverServiceInternalUri
for OWA and ECP check the servers / virtual directories tab in Exchange Administrative Center from all apps AKA 'ecp'
In ECP you can also add mail boxes from the recipients tab.

Found out the frequent disconnects to the server could be fixed by changing the connection on the DC to wired from wireless.
Trying to figure out why outlook wouldn't connect. Tried https://myfqdnexchange/Autodiscover/Autodiscover.xml but got an error about "Could not load file or assembly ‘Microsoft.Exchange.Security'"
Taking a cue from https://exchangeranger.wordpress.com/2015/06/12/exchange-2013-cu8-application-event-warning-1310-microsoft-exchange-security-assembly/ copied SharedWebConfig.config from C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy to C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess
Then it gave me a 600 error which is actually indicative that everything is working! And sure enough, able to auto connect through Outlook (after deleting the corrupted profile from previous attempts from control panel, mail).
Note: I was able to connect from Outlook 2016. I added a host file entry with autodiscover.mydomain.com x.x.x.x but I'm not sure if that was necessary. Regardless I couldn't connect from Outlook 2013 (coudn't find server). But I was able to connect to owa via https://servername.mydomain.com/owa.


Then followed: http://sharepointgeorge.com/2010/configuring-outgoing-email-sharepoint-2010/
For the receiver connector selected "Frontend Transport" instead of Hub Transport because I heard on https://www.youtube.com/watch?v=73UBX_oJfgk that the latter is buggy.
For the CA Outgoing E-mail settings part, following https://alinimer.wordpress.com/2014/09/25/configure-outgoing-e-mail-for-sharepoint-20102013-to-using-office-365-or-gmail-relay/ instead, i.e. will relay through local SMTP server service (which is set in Services to start automatically), this is in case I wish to ditch Exchange and go with gmail in the future. For outbound security part, I will leave anonymous for now to connect to Exchange. So for Outbound Connections leave at port 25 (Exchange). For smart host, entered the FQDN of the Exchange server. For SMTP E-mail setting in IIS part, checked "Use localhost" box instead of entering the FQDN of the local server.

Set up an email address for a test user: Application Management, Manage Service Applications, User Profile Service Application, Manage User Profiles and add the test user's exchange email as the Work email property. Had to wait around 1/2 hour before it would show up as the test user's email under "Send me alerts by:" in the tasks list "New Alert" screen. Thought about enabling AD synchronization but it looked to complicated and outside of scope of this lab. Verified alert was sent to test user upon test user creating alert and task created. Couldn't do the "Send e-mail when ownership is assigned" test because apparently that feature was removed from SharePoint 2013, see http://sharepoint.stackexchange.com/questions/65056/send-email-when-ownership-is-assigned-due-date-functionality.

Followed https://technet.microsoft.com/en-us/library/jj657457(v=exchg.160).aspx to allow sending to non-exchange email addresses associated with user profiles in SharePoint.

No comments:

Post a Comment