Need to have email alerts on processes

  • Hello,

    We have a SQL server 2000 server using Windows 2000 professional edition. We need email notification for our dbas so that they can monitor our SB processes. But, we use lotus notes on a domino server and operations does not let us install any email clients on the Db server. Can anyone help us understand how we could make this work?

     

    Regards

  • Try using the Search on the toolbar, type Domino, select all three options and search.  Several articles on what you are looking for



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • The best tool that I found for this sort of things (regardless of what mail system you use, be it Notes, Groupwise or Exchange) is a small utility called Blat.

    Check

    http://www.blat.net/194/

    Cheers

    Dan

  • We're in exactly the same boat. We're a Lotus Notes shop, and I'm not allowed to install windows email clients on our server. To get around this, we use a little vbs script that sends an email directly. This does need a SMTP server. In our case, I'm referencing our Notes server.

    Obviously you'll need to fill in a few things for your situation. What's nice about this is that it can be completely customized to your situation. I use this as an error notice and confirmation step in DTS scripts and SQL jobs. Drop this script into a file called 'mail.vbs' and have fun!

    Steve G.

    ----------------------------------------------------------------

    'arguments are email subject, email body and email destinations, each in double

    'quotes, like

    'EXEC xp_cmdshell 'c:\vbs\mail.vbs "subject" "body" "a@abc.com b@job.com" '

    'get the arguments

    set objArgs = Wscript.Arguments

    'diagnostics

    'WScript.Echo "To: " + objArgs(2)

    'WScript.Echo "Text: " + objArgs(1)

    'WScript.Echo "Subject: " + objArgs(0)

    'create mail message object

    Set objEmail = CreateObject("CDO.Message")

    'set from and to addresses - from address indicates which machine

    objEmail.From = "your_SQLServer_machine_here@your_domain_here"

    objEmail.To = objArgs(2)

    'Set the subject and body of the message to tell us what happened

    objEmail.Subject = objArgs(0)

    objEmail.Textbody = objArgs(1)

    'Create configuration object

    Set objConfig = CreateObject("CDO.configuration")

    Set objFields = objConfig.Fields

    With objFields

    .Item("http://schemas.microsoft.com/cdo/configuration/SendUsing")= 2

    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")= "your_mail_server_here"

    .Item("http://schemas.microsoft.com/cdo/configuration/SMTPServerPort")= 25

    .Item("http://schemas.microsoft.com/cdo/configuration/SMTPConnectionTimeout")= 10

    .Update

    End With

    'Set configuration object

    objEmail.Configuration = objConfig

    'Send the message

    objEmail.Send

    'Clean up

    set objArgs = nothing

    set objEmail = nothing

  • We had had this issue with some of our customers.  Official Microsoft response is:

     

    "Microsoft does not support using SQL Mail to communicate with mail servers such as Lotus Notes, Lotus cc:Mail, or Novell GroupWise unless they are treated as POP3 servers."

    http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b263556

     

  • Aureolin,

    I got your script to work but could not get it to work with the echo statements.  I guess a message box was waiting for a response but I could not see the message box to respond so it would hang.  I was running it from query analyzer.

     

    Sue

     

     

  • SueB - you're absolutely right. The "ECHO" statements start a hidden CMD process, waiting on your response. I.e. it hangs up if you uncomment out the "Echo" statements and run this from QA. To test the script, run it from a DOS window as

    c:\vbs\mail.vbs "subject" "body" "a@abc.com b@job.com"

    Sorry 'bout the misdirection!

    Steve G.

  • Thanks aureolin!  That did the trick.

     

    Sue

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply