Skip to Content
Author's profile photo Yogesh Patel

Software Update Manager 1.0 SP19 MailNotifier for ABAP

Hello Friends,

As you know there is no option available on SUM tool directly to send email notification of process waiting for your input.

SAP developed tool call “MailNotifier” which is very useful to notify SUM is for waiting for user input.

Please follow below to configure Mail Notification.

  • Login to SAP server where SUM process is running

Navigate to: <X>:\usr\sap\<SID>\SUM\abap\mailNotifier

Note: This is your SUM extract directory

  • Open and modify “MailNotificationApp.props” file

Section : Mail Notifier Default Properties

sum.host    = Host_Name
sum.port    = 1128
sum.user    = <sid>adm 
sum.pwd     = PASSWORD
sum.sid     = <SID>
sum.type    = sumabap
sum.ssl     =  false

Note:

  1. port is default 1129 but I have is shown as 1128 because sum process running through HTTP and NOT HTTPS
  2. ssl = false because I am running sum as HTTP

As per SAP guide do not provide password on this props file and you can run command as shown below and it will automatically ask for password

Section : Mail related properties

 

mail.host = SMTP_HOST_NAME
mail.port = SMTP_PORT
mail.user = USER_NAME
mail.pwd  = PASSWORD
mail.from = FROM_email_Address
mail.to   = To_email1,To_email2

 

Section : Check related properties

check.interval = 60
check.tries    =  5

Note: I leave this as default values

  • Set JAVA Path through environment variable

 

Check Java version to make sure path is working

 

  • Run Command as : java -jar MailNotifierApp.jar properties=MailNotifierApp.props

Note: Keep this window open to receive alerts

Now you will get first email from tool as below

Note: After SUM process finish you can remove environment variable you created previously.

Thank you for reading

Yogesh

Assigned Tags

      16 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Lieven De Bock
      Lieven De Bock

      What Windows version are you on ? I run into HTTP Response Code 401..

      I'm not doing anything different  ?

       

      Best,

       

      Lieven

       

       

      Author's profile photo Yogesh Patel
      Yogesh Patel
      Blog Post Author

      Hello Lieven,

      I am on windows server 2012

      Can you provide all required details in MailNotificationApp.props file including password and check it again?

      Make sure in command proper props file name provided: java -jar MailNotifierApp.jar properties=MailNotifierApp.props

      For example your file will be looks like below

      ###############################################################################
      #
      # Mail Notifier Default Properties 
      #
      
      ###############################################################################
      #
      # Upgrade related properties
      #
      #   sum.host    name of the host on which SUM is running 
      #   sum.port    port number SUM is listening (1129 for https, 1128 for http)
      #
      #   sum.user    <sid>adm
      #   sum.pwd     password of <sid>adm 
      #   sum.sid     <sid> of the system
      # 
      #   sum.type    scenario type of running SUM (sumabap|dualabap|migtool)
      #   sum.ssl     (true|false) use of https or http
      #   
      
      sum.host    = GBSAPERP4
      sum.port    = 1128
      
      sum.user    = sr1adm
      sum.pwd     = <Your_PASSWORD>
      sum.sid     = SR1
      
      sum.type    = sumabap
      sum.ssl     = false
      
      
      ###############################################################################
      #
      # Mail related properties
      #
      #   mail.host  name of the SMTP host of the mail provider
      #   mail.port  port number of the SMTP host of the mail provider
      #   mail.user  mail box user
      #   mail.pwd   pwd of the mail box user 
      #
      #   mail.from  sender address of the notification mails
      #   mail.to    receiver address of the notification mails 
      #
      
      mail.host = smtphostname.domain.com
      mail.port = SMTP_Server_PORT
      mail.user = sr1adm
      mail.pwd  = <Your_PASSWORD>
      
      mail.from = sr1adm@domain.com
      mail.to   = mail1@domain.com,mail2@domain.com
      
      ###############################################################################
      #
      # Check related properties
      #
      #   check.interval  interval (in sec) SUM process is checked
      #   check.tries     number of checks executed before a notification mail is sent
      #
      
      check.interval = 60
      check.tries    =  5
      
      #
      #
      ###############################################################################
      

       

      Thank you

      Yogesh

       

      Author's profile photo Sanjay Sahita
      Sanjay Sahita

      Hi Yogesh,

       

      Thanks for the excellent blog.

      I am getting same 401 error.

      We do not need a id / pwd to send mails; Though I gave sidadm id and password; I still get error 401. Any clues ?

      wsapvm103:wfsadm 58> java -jar MailNotifierApp.jar properties=MailNotifierApp.props
      [08.03.2017 14:10:05] INFO SumMailNotifier (Version 1.4.10) - starting ...
      [08.03.2017 14:10:05] INFO Reading properties from classpath "com/sap/lm/sl/upg/notifier/MailNotifierApp.props"
      [08.03.2017 14:10:05] INFO Reading properties from file "MailNotifierApp.props"
      [08.03.2017 14:10:05] INFO Requesting missing mandatory properties:
      [08.03.2017 14:10:05] INFO Properties "SumMailNotifier Properties"
      [08.03.2017 14:10:05] INFO check.interval = "60"
      [08.03.2017 14:10:05] INFO check.tries = "5"
      [08.03.2017 14:10:05] INFO mail.from = "noreply@wihuri.local"
      [08.03.2017 14:10:05] INFO mail.host = "mxrelay.xxx.local "
      [08.03.2017 14:10:05] INFO mail.port = "25"
      [08.03.2017 14:10:05] INFO mail.pwd = "<hidden>"
      [08.03.2017 14:10:05] INFO mail.to = "xxx@xxx.com"
      [08.03.2017 14:10:05] INFO mail.user = "wfsadm"
      [08.03.2017 14:10:05] INFO properties = "MailNotifierApp.props"
      [08.03.2017 14:10:05] INFO sum.host = "localhost"
      [08.03.2017 14:10:05] INFO sum.port = "1128"
      [08.03.2017 14:10:05] INFO sum.pwd = "<hidden>"
      [08.03.2017 14:10:05] INFO sum.sid = "WFS"
      [08.03.2017 14:10:05] INFO sum.ssl = "false"
      [08.03.2017 14:10:05] INFO sum.type = "sumabap"
      [08.03.2017 14:10:05] INFO sum.user = "wfsadm "
      [08.03.2017 14:10:05] INFO SUM Monitor Request URL = http://localhost:1128/slp/sumabap/WFS/monitor
      [08.03.2017 14:10:05] INFO Starting check request ...
      [08.03.2017 14:10:09] ERROR SumMailNotifier (Version 1.4.10) finished with errors: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:1128/slp/sumabap/WFS/monitor

       

      BR,

      Sanjay

      Author's profile photo Yogesh Patel
      Yogesh Patel
      Blog Post Author

      Hello Sanjay,

      Did you provide password in .props file?

      If Not please provide password in there and try again

      Make sure put host name and not localhost

      Thanks

      Yogesh

      Author's profile photo Lieven De Bock
      Lieven De Bock

       

      Alas,.. no luck..

      Propertyfile is correctly maintained.

      e:
      cd E:\usr\sap\SR1\SUM\abap\mailNotifier
      java -jar MailNotifierApp.jar properties=X:\sources\Prerequisites.SUM\Start_Maillnotifier\jar-not_functioning\MailNotifierApp.props

       

      And still...

       

       

      Author's profile photo Lieven De Bock
      Lieven De Bock

       

      So I worked out a powershell script,.. reading the XML at the URL...

      $uri = "http://[hostname].pidpant.local:1128/slp/sumabap/[SID]/monitor"

      [xml]$doc = Invoke-WebRequest -Uri $uri -Credential $cred

      and so I mimic the 'MailNotifier'...

      Allowing me to:

      • trigger sending an SMS and/or email
      • build a 'log' containing phases, statusses ...

      which kind of exceeds the functionality of the jar..

       

      Author's profile photo Former Member
      Former Member

      Also having the same 401 issue....

      Author's profile photo Sathiyaraj Jagadesh
      Sathiyaraj Jagadesh

      Hello All - I also get 401 issue... IF my sidadm password has special character, how should I put it? Looks like its not interpreting special character in my password properly.

      Author's profile photo Yogesh Patel
      Yogesh Patel
      Blog Post Author

      what if you do not provide password in to  .props file and try again?

      -Yogesh

      Author's profile photo Sathiyaraj Jagadesh
      Sathiyaraj Jagadesh

      I got below info from SAP -

       

      java -jar MailNotifierApp.jar properties=MailNotifierA.props sum.user=<sid>adm sum.pwd="password"

       

      they aske me to use this command with quotes.

      Author's profile photo Yogesh Patel
      Yogesh Patel
      Blog Post Author

      That is right info

       

      Author's profile photo Bruno Winocur
      Bruno Winocur

      Hello Yogesh, also another 401 error here. if I copy the URL the script is trying to access and I input user and password that i gave in props file i can see the XML yet the mailNotifier cant.

       

      using SP20

       

      regards,

      Author's profile photo Yogesh Patel
      Yogesh Patel
      Blog Post Author

      what if you do not provide password in to  .props file and try again?

      Author's profile photo Reynan Santos Oliveira
      Reynan Santos Oliveira

      If you are encountre the problem ERROR SumMailNotifier (Version 1.4.11) finished with errors: java.io.FileNotFoundException: http://hostname:1128/slp/dualabap/DEV/monitor.

      You should put sum.type = sumabap in the MailNotifierApp.props file, and inform the following command line: java -jar MailNotifierApp.jar properties=MailNotifierApp.props sum.user=<SID>adm sum.pwd=password.

      regards.

      Author's profile photo Florian Lamml
      Florian Lamml

      Is there a possibility to start a command instead of an eMail? I work a lot with Pushover. Just curl a web page and I get a notification. You don’t need a SMTP server or anything else.

      Example for Pushover:

      curl -s \
        --form-string "token=abc123" \
        --form-string "user=user123" \
        --form-string "message=hello world" \
        https://api.pushover.net/1/messages.json
      Author's profile photo Amar Ramraje
      Amar Ramraje

      Hi Yogesh,

      Can this be used for Linux systems.

      If yes, what steps needs to be taken on linux.

      Regards,

      Amar