Results 1 to 4 of 4
  1. #1

    Sending e-mail alerts when a test fails

    Hello everyone,

    This forum has been very helpful to me and I have learned a lot looking through the different topics.
    However I couldn't find any information on sending notifications to your mail box. Could anybody please provide some guidance. Is there any CSO library function available for this?

    Any help would be greatly appreciated.


  2. #2
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    St. Louis - Year 2025

    Re: Sending e-mail alerts when a test fails

    Hello Shilpa,

    Please research these links. there are at least a couple methods mentioned. One includes the CSO lib.



  3. #3

    Re: Sending e-mail alerts when a test fails

    Hi Shilpa,

    Have u succeeded in sending notifications to mail box. I was trying this but could not succeed. Please help me if u have succeeded in it.


  4. #4

    Re: Sending e-mail alerts when a test fails

    Hi Krishna,

    Yes I have done it.... This may help you!

    # ----------------------------------------------
    # Shell_TrayWnd
    set_window ("Shell_TrayWnd", 1);
    button_press ("Start");

    # BaseBar
    set_window ("BaseBar", 1);
    toolbar_select_item ("ToolbarWindow32_1", "Run...");
    # Run
    set_window ("Run", 2);
    edit_set ("Open:_1", "cmd");
    obj_type ("Open:_1","<kReturn>");

    reload ("win32api", 1, 1);
    hWnd = FindWindowA("ConsoleWindowClass","C:\WINNT\system3 2\cmd.exe");
    DPROMPT = "{ handle: " & hWnd & " }";
    set_window (DPROMPT);
    win_activate (DPROMPT);
    win_type (DPROMPT, "cd \scripts"&"<kReturn>");
    # -----------------------------------------------
    # Create the whole script as a function and send the varialbles are parameters
    # -----------------------------------------------
    MailSrv = " test@domain.com"; # is the SMTP IP address. test@domain.com is the from address
    ToMail = "sivadreams@yahoo.com"; # To address to which the norification should be sent
    ScriptName = "TestScript"; # The Test Script Name or the Step Name
    Status = "Passed"; # Status of the test
    # -----------------------------------------------
    ms_login = "Blat \-install "&MailSrv;
    sendmail = "c:\\scripts\\Blat myfile.txt \-subject \""&ScriptName&" - "&Status&"\" \-to "&ToMail;
    win_type (DPROMPT, ms_login&"<kReturn>");
    win_type (DPROMPT, sendmail&"<kReturn>");
    win_type (DPROMPT, "exit"&"<kReturn>");
    # -------------------------------------------

    You need to Store the Blat setup in the C:\Scripts directory for this code to work

    Download the blat files from the following link.
    Siva Kumar



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:42 PM.

Copyright BetaSoft Inc.