Configuring outgoing email settings for SharePoint with Exchange Online aka office365
Install SMTP role on one of the Servers in the domain which has access to internet, since we need to connect to smtp.office365.com this is must.
Configuring SMTP service so that it can talk to office365 smtp
Open --> IIS 6.0 Manager --> right click on SMTP --> properties
2.1 First we will configure the Access, we don’t have much to configure in this. Check authentication is set to anonymous
2.2 Next click on connection button and you can select which servers can connect to this virtual server, by default it is set to accept all. If you need you can modify as per your orgs security policies
2.3 Next click on relay, here you can select which computer can relay through this SMTP. If you need that any computer / server can relay through this, select all except the list below option
2.4 Next click on Messages tab, here we don’t have to change anything except if you need to change the badmail directory i.e. where SMTP store any email that it fails to deliver due to one or the other reason.
2.5 Next click on delivery tab à outbound security, here chose basic authentication and provide a username and password, remember this user should have a valid exchange online mailbox. Also make sure you check TLS encryption here
2.6 Next click on outbound connections, here we can specify the port as 25 or 587 and leave rest as it is
2.7 Next click on Advanced , here you can provide FQDN name of your domain and smart host which should be set to smtp.office365.com
This completes our SMTP level configuration
3. Testing the connection
3.1 Install telnet client on the server : Server manager à add feature à check Telnet client
3.2 Open cmd prompt and run the following
telnet localhost 25:
helo
mail from:<office365 email address>
rcpt to:<to address>
data
subject:test mail
test email
.
Quit
4. Configuring SharePoint server
4.1 CA --> system settings --> outgoing email settings
Make sure that from address have permissions to send email through your exchange online else you will see bad email in your badmail directory on the SMTP Server with the following message in it
-
Diagnostic-Code: smtp; 550 5.7.1 Client does not have permissions to send as this sender
To test the outgoing email settings just set any alert on one of the document libraries or any list for any user with a valid email address
Comments
- Anonymous
January 01, 2003
Hey Mladen,
what Yash is describing above is for on-premises SharePoint 2013 to connect to in-cloud Exchange Online. So access to Central Admin is per a normal, local SP farm.
But I have a question for Yash: what about configuring out-bound email for SharePoint Online, when you DON'T have Exchange Online as well?
Thanks
Craig - Anonymous
July 08, 2014
How do you access Central Administration in Office 365
(step 4.1 CA --> system settings --> outgoing email settings ) - Anonymous
November 30, 2014
Hi,
I tried above mentioned steps but the mail is not sending.