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:
- port is default 1129 but I have is shown as 1128 because sum process running through HTTP and NOT HTTPS
- 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
What Windows version are you on ? I run into HTTP Response Code 401..
I'm not doing anything different ?
Best,
Lieven
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
Thank you
Yogesh
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
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
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...
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:
which kind of exceeds the functionality of the jar..
Also having the same 401 issue....
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.
what if you do not provide password in to .props file and try again?
-Yogesh
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.
That is right info
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,
what if you do not provide password in to .props file and try again?
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.
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:
Hi Yogesh,
Can this be used for Linux systems.
If yes, what steps needs to be taken on linux.
Regards,
Amar