Skip to Content
Author's profile photo Tobias Hofmann

Configuring SAP SMTP service

SAP ECC permits sending and receiving of messages, including email. NetWeaver ABAP comes with everything needed to set up the configuration. What is needed is an external email infrastructure to have a usable mail configuration in SAP that allows for sending and receiving email:

  • External SMTP server. Acts as a SMTP server between SAP and the receiver. This is the email server used to send emails. This can be the official SMTP server of the corporation or any other valid one, like Yahoo.
  • Route for incoming emails. As the MX DNS entry for a domain normally points to the SMTP server mentioned above, the SAP SMTP server won’t receive emails automatically. A forwarding rule between the SMTP server and the SAP SMTP server needs to be configured.

/wp-content/uploads/2013/09/smtp1_281080.jpg

Configuration of SMTP in SAP

Title

Link

SAP Note: 455140

https://service.sap.com/sap/support/notes/455140

SAP Help

http://help.sap.com/saphelp_nw70/helpdata/en/af/73563c1e734f0fe10000000a114084/content.htm

The steps are pretty simple. All are to be executed in the SAP system. I used the NPL Gateway Demo system for this.

1. Open the port for SMTP

Transaction: RZ10

In case this was not done before, import the profiles

/wp-content/uploads/2013/09/smtp2_281099.jpg

Select the right profile (here: instance profile) and the Extended maintenance option.

/wp-content/uploads/2013/09/smtp3_281100.jpg

To receive emails on an SMTP port, ICM needs to be configured to

    1. Open the port and to
    2. Use protocol SMTP

Add an entry for SMTP in the instance profile. Here, the port used is 25000.

/wp-content/uploads/2013/09/smtp4_281101.jpg

Save changes to instance profile.

/wp-content/uploads/2013/09/smtp5_281102.jpg

Then save and activate the changes.

/wp-content/uploads/2013/09/smtp6_281103.jpg

Warning message informs that a ICM restart is needed to activate the changes.

/wp-content/uploads/2013/09/smtp7_281104.jpg

Looking in the profile file on the server:

/wp-content/uploads/2013/09/smtp8_281105.jpg

ICM profile file is changed, change is persisted in the file but ICM does not pick up the new configuration automatically. A restart of ICM is needed.

Transaction: SMICM

/wp-content/uploads/2013/09/smtp9_281106.jpg

The Restart option didn’t work for me, a hard exit with a start activated the change. But I am not Basis person.

/wp-content/uploads/2013/09/smtp10_281107.jpg

Confirm the restart of ICM.

/wp-content/uploads/2013/09/smtp11_281108.jpg

Check the SMTP service details. They have to match the new configuration.

/wp-content/uploads/2013/09/smtp12_281109.jpg

Verifying the ICM parameters using SAP MMC.

/wp-content/uploads/2013/09/smtp13_281110.jpg

2. Create system user for receiving emails

Transaction: SU01

/wp-content/uploads/2013/09/smtp14_281111.jpg

Make sure the users in the SAP system have an email address configured.

/wp-content/uploads/2013/09/smtp15_281112.jpg

Here I am using tobias@mydomain.com

With this configuration, email send to the SAP SMTP server will be picked up and delivered into the user’s inbox.

3. Configure SMTP service

Transaction: SICF

/wp-content/uploads/2013/09/smtp16_281113.jpg

Check that the virtual SMTP server is configured

/wp-content/uploads/2013/09/smtp17_281163.jpg

The logon data has to be configured to use the above created SMTPUSER

/wp-content/uploads/2013/09/smtp18_281164.jpg

Handler list

/wp-content/uploads/2013/09/smtp19_281165.jpg

Save the changes and activate the service.

/wp-content/uploads/2013/09/smtp20_281166.jpg

Configure the SMTP server and outbound and inbound flow

  1. SMTP server

Transaction: SCOT

Set the default domain

/wp-content/uploads/2013/09/smtp21_281168.jpg

This domain matches the email domain of the users.

  1. Outbound

View: Nodes view

Set the outgoing SMTP server

/wp-content/uploads/2013/09/smtp22_281169.jpg

Note: This is the SMTP server the SAP system will use to actually send the emails. Emails get send to this SMTP server and from there they are being send to the actual recipient. That is, the server defined has the responsibility to lookup the MX entry of the receiving domain.

Set the address type this node does accept

/wp-content/uploads/2013/09/smtp23_281170.jpg

Note: In the address area, insert the valid format of email addresses. When you insert * the node will accept every email address. To make this node only accept email addresses for a specific user, put <username>@domain.tld

/wp-content/uploads/2013/09/smtp24_281171.jpg

Result in node view

/wp-content/uploads/2013/09/smtp25_281172.jpg

Now the node is configured to accept outgoing emails. What is missing is a job that picks up the emails from the outgoing queue and sends them. Create a job that will send the queued messages

View: Job view

/wp-content/uploads/2013/09/smtp26_281173.jpg

/wp-content/uploads/2013/09/smtp27_281174.jpg

Select SAP&CONNECTALL or SAP&CONNECTINT for sending internet email

/wp-content/uploads/2013/09/smtp28_281175.jpg

To run the job immediately, select “Start immediately”. To schedule a job so it is executed at a defined interval, select “Schedule”

/wp-content/uploads/2013/09/smtp29_281176.jpg

To schedule

/wp-content/uploads/2013/09/smtp30_281177.jpg

/wp-content/uploads/2013/09/smtp31_281178.jpg

Result

/wp-content/uploads/2013/09/smtp32_281179.jpg

  1. Inbound

As long as the virtual SMTP server is activated and the system user has the right permission AND a user with the correct email address exists, inbound processing of emails will work.

Assigned Tags

      59 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      As always, great write up Tobias. Do you plan to cover SAPConnect configuration settings, eg. ESMTP? What about security, S/MIME and enhancements?

      Author's profile photo Tobias Hofmann
      Tobias Hofmann
      Blog Post Author

      Thanks Samuli,

       

      No, this kind of stuff I'll let to Basis guys. I'm interested in testing. I only wrote this document so I can refer to it in my next blog posts about testing the SMTP service.

      Author's profile photo Tobias Hofmann
      Tobias Hofmann
      Blog Post Author
      Author's profile photo Reagan Benjamin
      Reagan Benjamin

      Honestly one of the best articles on SCN.

      Perfectly done.

       

      Regards

      RB

      Author's profile photo Tobias Hofmann
      Tobias Hofmann
      Blog Post Author

      Wow, thanks. That's not what I expected to hear.

       

      I am sure that I have seen better and greater articles on SCN and there was one where the SMTP configuration was also explained (believe it was part of a greater PI related article?). Just didn't want to refer to other peoples documentation in my next blogs. I am starting to take over SAP's "not invented here" syndrom

      Author's profile photo Reagan Benjamin
      Reagan Benjamin

      one of the best articles

      For sure there are and that's why I mentioned the above part in my first reply.

      What matters is the quality of the article and the uniqueness from the others.

      The first picture in yours really made the difference.

       

      Regards

      RB

      Author's profile photo Eduardo Rezende
      Eduardo Rezende

      Very good (and detailed) document Tobias.

      Author's profile photo Raquel Pereira da Cunha
      Raquel Pereira da Cunha

      Hi Tobias,

      Very complete doc explaining all the steps. Some of them related to inbound was unknown to me. Thank you for putting all this info together.

       

      Cheers,

      Raquel

      Author's profile photo Osvaldo Lopez
      Osvaldo Lopez

      "Exceptional" doc

       

      Keep posting

       

      Regards!

      Author's profile photo Rafikul Hussain
      Rafikul Hussain

      Hi Tobias,

       

      Great blog.

      Hope will get some info regarding the configuration of exchange server in this scenario in next blog.

       

      Regards,

      Rafikul

      Author's profile photo ABHISHEK SINGH
      ABHISHEK SINGH

      Hi Tobias ,

       

       

      Nice Document

       

       

      Regards,

       

      Abhishek

      Author's profile photo Krishna Chaitanya
      Krishna Chaitanya

      Really very useful doc.  Thanks for sharing. 

       

      Regards,

      Krishna Chaitanya.

      Author's profile photo Juan Reyes
      Juan Reyes

      The only thing easier than following this blog will be that Tobias does the config for you.

       

      Juan

      Author's profile photo Tobias Hofmann
      Tobias Hofmann
      Blog Post Author

      Somehow, this can be arranged

      Author's profile photo Abhishek Kadiri
      Abhishek Kadiri

      One of the best blogs! Very easy to follow!

       

      Cheers!

      Abhishek

      Author's profile photo Hemanth Kumar
      Hemanth Kumar

      As usual, great work Tobias

      Author's profile photo Former Member
      Former Member

      Thnx Tobias

       

      Excellent work.. keep coming more those..

       

      Cheers

      Pradyp

      Author's profile photo Former Member
      Former Member

      Thank you very much for this tutorial. It is really well made. *

      Author's profile photo Former Member
      Former Member

      Helpful document. Thanks

      Author's profile photo Former Member
      Former Member

      Excelent and helpfull abstract!

      Author's profile photo Ashutosh Chaturvedi
      Ashutosh Chaturvedi

      Hi Tobial,

      is it a to and fro SMTP configuration.

      Receiving  a mail from external SMTP.

       

      With Regards

      Ashutosh Chaturvedi

      Author's profile photo Divyanshu Srivastava
      Divyanshu Srivastava

      Neat and comprehensive. Too good.

       

      Regards,

      Divyanshu

      Author's profile photo Former Member
      Former Member

      Really helpful..gr888 stuff..keep it up..

      Author's profile photo Former Member
      Former Member

      Really helpful and well explained.....Thank you Tobias.

      Author's profile photo Mohamed Chérif BOUKHALFA-BENNAI
      Mohamed Chérif BOUKHALFA-BENNAI

      Hello,
      thank you so much for configuring SAP SMTP service.

      Thank you "Tobias Hofmann"

       

      Author's profile photo Sigrid Wieshofer
      Sigrid Wieshofer

      Hi Tobias Hofmann

       

      That's a real great article!! It might also help to set up E-Mails in CRM Interaction Center. We  often get incidents for CRM-IC-EMS but the real root cause is related to setting up SAP SMTP service which is the basis for our CRM IC Pull E-Mail - next time I will propose your article .

       

      Best Regards,

      Sigrid

      Author's profile photo Former Member
      Former Member

      Hi Tobias,

       

      Thanks for the comprehensive document.

      I am trying to test the same for my system but have been struggling with it for the past few days.I have configured exactly as mentioned in this doc but still not able to receive mail on my outlook mail id.

      What could be the problem?

       

       

      Varsha

      Author's profile photo Former Member
      Former Member

      Hi Tobias Hofmann

       

      Thank you so much for this document. Its really helpfull.

      Author's profile photo Rahul Gaikwad
      Rahul Gaikwad

      This document is really helpful and self explanatory

      Thanks Tobias

      Author's profile photo Felipe Pezo A.
      Felipe Pezo A.

      Thanks so much, its very helpful!

       

      Best regards!

      @fepezoabarca

      Author's profile photo Former Member
      Former Member

      Hi Tobias,

       

      Thank you for the detailed information. According to your information, I performed all the steps but I don't receive any scheduled emails to my Outlook Inbox.

       

      Any ideas, please?

       

      Best regards,

      Srinu

      Author's profile photo Former Member
      Former Member

      Hi Srinu

      Have you checked if you have email / outlook integration with your SAP, if not enable and integrate outlook with your SAP System and then check your SOST.

       

      have a check if the email smtp port is open for access.

       

      cheers

      Raj

      Author's profile photo Tobias Hofmann
      Tobias Hofmann
      Blog Post Author

      Wow. This document has over 22k views, 31 rates, 82 people bookmarked it and 62 likes. I hope this document helped a lot of people to understand better SMTP configuration in SAP ECC / ICF. I published it in 2013 and still people are rating and liking it.


      Just sharing a screenshot of my reputation page:

      /wp-content/uploads/2015/03/screenshot_869_663408.jpg

      Author's profile photo Ashwani Kumar
      Ashwani Kumar

      Hi Expert,

       

      I want to configure only send mail from SAP.

      I do not want to receive any mail in SAP system.

       

      Here I have read many documents, but could not success.

      Please help me to do the same.

      Some details about our setup and landscape.

       

      Mail Service Provider: Google

      SMTP Port No.: 465 or 587

      Mail Server: mail.google.com

      Our Domain: company.com

      SAP DEV Instance: 00

       

      What changes required in profile parameters?

      Any one configure from Google server to there company mail?

       

      Please do the needful.

       

      Thanks

      Ashwani

      Author's profile photo Former Member
      Former Member

      Hello Tobias, This document is really help full.

       

      I have done the set up using this as base material.

       

      Was very help full.

       

      Br,

      Shyamal

      Author's profile photo Former Member
      Former Member

      Very nice document.
      Precise description with appropriate screenshots!
      Thanks..

       

      Regards,

      Ali

      Author's profile photo Former Member
      Former Member

      Hi,

       

      I have a requirement to implement this in our system. So i did was configure this in DEV. How can I transport this in QAS and PRD. To be specific is with logon data in SICF how can I transport it? When I tried changing it in QAS, the system says it is non modifiable.

       

      Regards,

       

      Mike

      Author's profile photo Tobias Hofmann
      Tobias Hofmann
      Blog Post Author

      You'll have to do these steps in each system.

      Author's profile photo Former Member
      Former Member

      Hi Tobias,

       

      A very good and detailed article... Kudos to you!!!!

       

      Regards

      Satish

      Author's profile photo Mohomad Swalay
      Mohomad Swalay

      Hi Tobias,

       

      Appreciated,

       

      Regards/Swalay

      Author's profile photo Steve Sutherland
      Steve Sutherland

      Hello, I was brought to this page from a Search on using authenticated SMTP from SAP.

       

      I'm a little unclear on how to authenticate to our in-house SMTP Server..

       

      We currently have this working to our in-house SMTP Server with No authentication required, but there is talk about switching to authenticated SMTP.

       

      Can you help?

       

      Thanks

      Steve

      Author's profile photo Rowie Formaran
      Rowie Formaran

      Hi Tobias,

       

      Good day, got a question on the part below:

       

      • External SMTP server. Acts as a SMTP server between SAP and the receiver. This is the email server used to send emails. This can be the official SMTP server of the corporation or any other valid one, like Yahoo.

       

      what if our SAP doesnt have ability for inbound email, would there be other way to implement offline approval?

       

      Cheers!

      Rowie

      Author's profile photo Tobias Hofmann
      Tobias Hofmann
      Blog Post Author

      Offline approval? As in a mobile scenario? There are apps for that, or do you use interactive PDFs?

      Author's profile photo Rowie Formaran
      Rowie Formaran

      It turned out that we only had to install an add on (qmail) to our linux mail server to be able to forward email to SAP. its working great. thanks Tobias

      Author's profile photo Sadiq Iqbal
      Sadiq Iqbal

      Hi Tobias

       

      Nice document ,

       

      note below will make it more effective ,

      421359 - ICM: Binding ports < 1024 on UNIX

       

      Thanks

      Sadiq

      Author's profile photo Tobias Hofmann
      Tobias Hofmann
      Blog Post Author

      It is possible to bind ICM to lower ports, like 25. If you want your ECC system to a low port is up to you. I'd not do it, only if I really have to. You should be able to configure your SMTP server to route emails to ICM on a custom port (like 25000).

      Author's profile photo Former Member
      Former Member

      Good one..

       

      Really very help full document.

       

      Thanks

      Mounika

      Author's profile photo Former Member
      Former Member

      Nice one!! Really helped me.. Thanks

      Author's profile photo Mohamed Kaleel
      Mohamed Kaleel

      HI Tobais,

       

      Nice document.

       

      I have one question.

       

      Ex. user is having user1@abc.com in the MS-Exchange while configuring in SAP System for receiving the email do we need to create different email address for this user for receiving .?

       

      Do we need to do any additional configuration in Mail Server to receive the same e-mail in SAP SMTP incoming e-mail server ..?

       

      Please clarify

      Author's profile photo Trident Limited
      Trident Limited

      Dear Tobias

       

      Our systems some times faileed to connect to the SMTP sever while sending outtgoing mails. That time the server fails to send the mails to the recipient and error message 816 appears shwoing red emails. Can there be a system of picking all these failed emails entries to retry to send say after 30 mins again and it should be automatic.

      Regards,

      Iqbal

      Author's profile photo Erik Hoven
      Erik Hoven

      In a SAP sandbox we want to deactivate the outbound mail - to avoid sending "sandbox-data" to our customers - but we want to activate the inbound mail.

       

      Is that possible ?

      Author's profile photo Shahzad Naseer
      Shahzad Naseer

      Nice .. thanks a lot , its helped me

      Author's profile photo Former Member
      Former Member

      Great article Tobias.   It hits every point and no more. Ideal!

      Author's profile photo João Costa
      João Costa

      Hi Tobias!

      This is a great document and really helps.

      Have a different scenario where the main thing is to receive mails in SAP from an Office365/Exchange Online account.

      Scenario is: SAP should connect to Office365 and receive all emails sent to a particular email address.

      Can’t put this to work..

      So, my question..Is this feasible? Does anyone already configured this? How to?…

      Thank you and Kind Regards,

      Joao

      Author's profile photo Diego Hernandez Rollizo
      Diego Hernandez Rollizo

       

      Hi,

      maybe this is the answer:

      2446448 - Accessing shared E-Mail boxes in Office365.com from SAP Contact Center

      icm/server_port_0 = PROT=HTTP,PORT=80$$,TIMEOUT=600,PROCTIMEOUT=600
      icm/server_port_1 = PROT=SMTP,PORT=25000,TIMEOUT=120,PROCTIMEOUT=120,TLS=2
      icm/HTTPS/client_sni_enabled TRUE
      Profile D saved and activated

      Restart icm (SMICM-Administration-ICM-Hard Shutdown-Global)

      https://docs.microsoft.com/en-us/office365/enterprise/urls-and-ip-address-ranges
      smtp.office365.com
      ID 2

      STRUST para añadir los certificados interim y root de digicert x.509 desde la URL de arriba (DigiCertBaltimore Root y Microsoft IT TLS CA 2) ad to ACL
      SSL client SSL Client (Anonymous)
      SSL client SSL Client (Standard)

      SCOT:
      description xxxxxx
      smtp.office365.com
      587
      Use TLS if possible
      Check Internet * PDF HTM TXT TXT

      insertar un usuario de email Settings Authentication (SMTP AUTH) user Name y Password

      Author's profile photo Prakash Singh
      Prakash Singh

      Hi joao,

      have you got any solution for this issue , i am having same issue and my SMTP services are running fine at SAP end , my Tests as per note 607108 - Problem analysis when sending or receiving e-mails are successful; but still i a not able to receive any emails sent from outlook to SAP Inbox.

      I am sure there is something to be done from outlook end as well to create the routing of emails from outlook to corresponding SAP server, but i am not sure exactly what.

       

      Thanks

      Author's profile photo Former Member
      Former Member

      Hi João,

      This post will probably answer your question.

      @Tobias, great job! Thanks for this post!

      Author's profile photo B. Krebbers
      B. Krebbers

      Hello Tobias,

       

      Is it also possible to make the outbox “Event Driven” instead of a scheduled job every 5 minutes.

      As soon as there is mail to be sent, the job should run.

      Please provide detailed config, if possible.

       

      Thanks,

       

      Bas

      Author's profile photo Sunny Ghataura
      Sunny Ghataura

      Hello Tobias,

       

      Great article, I have followed the steps, however I am running into an issue where I am able to send outbound emails without issue, but no inbound email is showing, unless I send to another user in SAP, or test using telnet.

       

      My Email server is exchange 2019 on prem.  Do you know if there are addional steps that need to be taken ?

       

      regards

      Sunny