SMTP Technical Architecture: Microsoft Office 365, S/4 HANA in Cloud, Private Edition
This is my first Technical Article. Please read and let me know if there are any modifications are needed.
As correctly pointed out by Suhel,
This blog post is about option 1) Authenticate your device or application directly with a Microsoft 365 or Office 365 mailbox, and send mail using SMTP AUTH client submission
You all might have seen the same content, topic by somebody or somewhere in the blogs.sap.com but one thing which was bothering me is nobody kept it simple and in one place. No worries, Here I’m. I was struggling but I don’t want anybody else to struggle.
This Blog is about SMTP- Technical Architecture with Office 365 (and SAP S/4 HANA system is hosted in Private Cloud). Point to remember, Inbound as well as outbound with Important Points. Let’s start!
Login to your SAP S/4 HANA System, consider you have 3-tier landscape then you can run a PoC in Development Landscape or directly in your Test Landscape. Upto you. Remember: None of the settings is transportable.
For Outbound SMTP Configuration
In your Development System, Run Transaction Code *SCOT*, you will see something as below,
Select and click Create Node using the Wizard (easy).
I have entered SMTP_D (for Development Landscape), further on you can have SMTP_Q for Quality Landscape, SMTP_T for Test Landscape and finally SMTP_P for Production landscape (your selection). Click Continue.
Enter Mail Host is, smtp.office365.com and Mail Port as 587 (Standard but if there are any changes in it then Microsoft Office 365 Team can help you; ask them about the Host and Port).
Before you continue, ensure that you must have a mailbox information with you. You need to have a mailbox (e.g., firstname.lastname@example.org) so that you can complete the SCOT related configuration.
Also, please allow/ whitelist smtp.office365.com with port 587 in your firewall. If SAP S/4 HANA system is hosted in Private Cloud under RISE with SAP offering, then raise an SR to get it whitelisted/ Allowed from.
Click Setting. This is important Step unless setup is tweaked by your organizations Microsoft Office 365 Team.
Enter email@example.com as UserName, and Password for that account. Microsoft Office 365 Team must provide you the Password of the newly created mailbox.
By default, it is on ‘No’, but click ‘Yes’ in security warning.
Click Continue. Then Select Internet, click Continue
Add ‘*’ in Address area and click Continue. You can restrict the Address Area too.
Select N, Click Continue.
Anything which could be ok here, we have used 0 hrs and 1 minutes
As a final Step, this is how it will look.
Add default Domain as yourdomain.com (your Organizations Domain, For example, SAP as an Organization the domain would be SAP.com)
Now, Schedule Job to send the mails, Click Send Jobs.
Click New, and select Schedule Job for all Address Types,
Test the e-Mail Send Functionality. Select SMTP Nodes, go to Utilities, and click Send Test Mail.
Run SOST to see the status of sent e-mail,
Blue colored status with msg code as 718 means All is Ok with your SMTP Setup.
How it looks,
-: Important :-
Every User ID must have firstname.lastname@example.org as an e-Mail ID in communication tab (transaction code SU01d) to send the e-Mails to anyone. SAP Security Team can maintain the same using SU01 Transaction Code.
Once you are done with all the above Steps then you will be able to send the e-Mails from SAP S/4 HANA system to III party e-Mail ID’s and your corporate e-Mail ID’s. Ensure, in SOST, Status must be Blue and Message Code must be 718.
Top 3 reasons which will cause a disruption in sending e-Mails from SAP System.
- SMTP Auth (basically, the User ID and Password to get authenticated on Office 365) is having any problem.
- SAP S/4 HANA system is not able to reach to smtp.office365.com on port 587 (it is blocked on Firewall or not whitelisted in Rules)
- An User who is trying to send the mail doesn’t have the email@example.com as an e-Mail ID in Communication Tab.
To Troubleshoot the Issue, Best way is,
- Run SMICM and go to ICM Logs.
- Increase the Trace Level to 3.
- Try sending e-Mail from SAP S/4 HANA system and check the trace.
- 455140 – Configuration of e-mail, fax, paging/SMS via SMTP – SAP ONE Support Launchpad
- 2690360 – XS812 – 550 5.7.60 SMTP; Client does not have permissions to send as this sender – SAP ONE Support Launchpad
- 1702632 – Authentication with user and password while sending mail through SAPconnect using SMTP – SAP ONE Support Launchpad
- 1496168 – Relay problem while sending mails through SAPconnect using SMTP plug-in – SAP ONE Support Launchpad
- 1950670 – Error XS856 “No delivery to &1, authentication required” occurs while sending mails through SMTP node – SAP ONE Support Launchpad
Hope this will help you setup e-Mail with Office 365 in SAP S/4 HANA system (in Private Cloud). Do let me know if I missed any points or if you have any questions. Happy to answer.
Thank you for reading.
Note: Technical Architecture: Blog Post on Inbound e-Mail setup is here, https://blogs.sap.com/2022/02/07/smtp-technical-architecture-microsoft-office-365-s-4-hana-in-cloud-private-edition-2/