Knowledge Share

Knowledge is NOT Power IMPLEMENTATION of knowledge is Power!!!
 
HomePortalGalleryCalendarFAQRegisterUsergroupsLog in

Share | 
 

 Automatic email after Coded UI Test execution

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin


Posts : 141
Points : 407
Reputation : 0
Join date : 2007-12-29
Location : Chennai

PostSubject: Automatic email after Coded UI Test execution   Tue Jul 14, 2015 10:35 am

Dim message As MailMessage = New MailMessage
        Dim ggProcess As New Process

        ggProcess = Process.Start("EXCEL.EXE")

        ggProcess.Kill()
        Dim message1 As MailMessage = New MailMessage
        Dim ggProcess1 As New Process

                    proc(i).CloseMainWindow()

        Next i


        message.From = New MailAddress("mail id")

        message.To.Add(New MailAddress("mail id"))
        message.To.Add(New MailAddress("mail id"))



        message.To.Add(New MailAddress("mail id"))

       


        Dim oAttch As System.Net.Mail.Attachment = New System.Net.Mail.Attachment("Path")


        'Dim oAttch1 As System.Net.Mail.Attachment = New System.Net.Mail.Attachment(report")
        'Dim oAttch2 As System.Net.Mail.Attachment = New System.Net.Mail.Attachment("report")
        message.Attachments.Add(oAttch)
        'message.Attachments.Add(oAttch1)
        'message.Attachments.Add(oAttch2)
        Dim reader As StreamReader = New StreamReader("path")
        message.Body = reader.ReadToEnd()
        message.IsBodyHtml = True
        Dim client As SmtpClient = New SmtpClient()
        Dim smtp As SmtpClient = New SmtpClient
        smtp.Host = ("smtp server name")
        smtp.EnableSsl = Convert.ToBoolean(True)//Optional
         NetworkCred.UserName = ("mail id")
        NetworkCred.Password = ("pwd")
        smtp.UseDefaultCredentials = True
        smtp.Credentials = NetworkCred
        smtp.Port = Integer.Parse("number")
        smtp.Send(message)
Back to top Go down
http://knowledgeshare.forumotion.com
 
Automatic email after Coded UI Test execution
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Send email automatically
» Webdriver C# Mouseover
» Executing Same test cases in multiple browsers simultaneously
» how to do email validation using selenium?
» How to move my selenium test cases from Rc to Grid

Permissions in this forum:You cannot reply to topics in this forum
Knowledge Share :: Testing :: Automation :: VSTS :: CODED UI-
Jump to: