on 03-30-2010 1:37 AM
Hi,
Can we setup email alerts , such a way that tool can send out a email when the upgrade encountered a error or if it is waiting for a input.
Thanks,
Tanuj
Hi Guys,
I have recently setup an alerting on SAP Upgrade tool SUM for windows. Please find the .BAT & .VBS files which you can use on Windows environment. Please paste the files in notepad and change it into .BAT & .VBS. Change .VBS script according to your requirement (changing emails, subject line, SMTP server details, SMTP Port, etc.). Make sure your windows box is allowed on SMTP host to send emails. You need to provide the .BAT file as a program in SUM/SAPehpi Alert menu. 🙂
.BAT File Contents:
f:\email.vbs
.VBS File Contents:
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "SUM Upgrade Update"
objMessage.From = "abc.com"
objMessage.To = "abc.com, xyz.com"
objMessage.TextBody = "SUM tool requires user inputs"
objMessage.AddAttachment "E:\usr\sap\EC5\SUM\abap\tmp\upalert.log"
'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "SMTP_SERVER"
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
'==End remote SMTP server configuration section==
objMessage.Send
Try this, it was working for us in our environment.
Thanks & Regards,
Mukul SHarma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Mukul.
I also added the following lines (smtp authentication (works with most freemailers), error handling (e.g. file in use), additional useful files):
Topmost:
On Error Resume Next
Somwhere in the middle:
objMessage.AddAttachment "F:\SUM\abap\log\SAPupConsole.log"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "ourlogin@gmx.net"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "P#ssw0rd"
I have this working very good on Windows but I would like to send the contents of the
upalert.log in the body of the email and not as an attachment. Anyone know the code syntax for that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> Can we setup email alerts , such a way that tool can send out a email when the upgrade encountered a error or if it is waiting for a input.
The system creates a file "upalert.log" with the phase name in
/usr/sap/<upg-dir>/EHPI/abap/tmp
You'll have to write a small script (depending on your OS) to check if that file exists and then trigger a mail.
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.