Micro Focus QTP (UFT) Forums
Test End Notification - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Test End Notification (/Thread-Test-End-Notification)



Test End Notification - Anna - 08-11-2008

Hi
Is there a way to notify someone when the test is done. I used to have Winrunner generate an email. Is there an equivalent in QTP?


RE: Test End Notification - surya_7mar - 08-13-2008

We can send mails using QTP.


RE: Test End Notification - surya_7mar - 08-13-2008

See this thread for the code https://www.learnqtp.com/forums/Thread-Email-from-qtp-to-Microsoft-outlook-through-vb-script


RE: Test End Notification - Rashmi - 08-14-2008

Hi,

The code for sending mail through qtp is in this function..is workign for me when i execution the function in QTP but when i open .vbs file it trhows syntax error..
Code:
Public Function SendMail(SendTo,SendCC,Subject,Body,Attachment)
    Dim olApp
    Dim olNs
    Dim olMail
    Set olApp = GetObject(, "Outlook.Application")
    On Error GoTo 0
    Set olMail = olApp.CreateItem(olMailItem)
    With olMail
        .To = SendTo
        .CC = SendCC
        .Subject = Subject
        .Body = Body
        .Attachments.Add(Attachment)
        .Display
    .Send
    End With
    Set olMail = Nothing
    Set olApp = Nothing
End Function



RE: Test End Notification - Anna - 08-18-2008

Hi,
Is there a function in QTP that does this .. ? Any other suggestions welcome.