Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Email for test results
#1
Solved: 10 Years, 9 Months, 1 Week ago Exclamation 
Hi,

can we send test reports through an email to a third party...
if yes then plz suggest me the way to do it...



Thanks
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
Hi,
Please use the below code you can pass the test reports(as attachments) .

Code:
Dim ToAddress
Dim Subject
Dim Body
Dim Attachment
Dim oUtlookApp, nAmeSpace, newMail

'SystemUtil.Run "C:\Program Files\Microsoft Office\Office11\OUTLOOK.EXE" 'This line should be enabled if the Outlook on the desktop is not running

ToAddress = "venkat.batchu81@gmail.com" ' Message recipient Address

Set oUtlookApp = CreateObject("Outlook.Application")

Set nAmeSpace = oUtlookApp.GetNamespace("MAPI")

Set newMail = oUtlookApp.CreateItem(0)

Subject = "Sending Test Results  through Outlook" 'Message Subject you can update

Body = "To view the test results of login and signoff. " 'Message body you can update

newMail.Subject = Subject

newMail.Body = Body & vbCrLf

newMail.Recipients.Add(ToAddress)

newMail.Attachments.Add("C:\Documents and Settings\venkat.batchu\Desktop\Results\Log\LogFile.html") 'You can update attachment file name

newMail.Send

Set nAmeSpace = Nothing

Set oUtlookApp = Nothing

Please let me know for further clarification.


Regards,
Venkat.Batchu
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Send automatic email notification when test run started helmzshelmz 0 931 04-03-2020, 07:54 AM
Last Post: helmzshelmz
  How to attach HTML file to Email Naresh 0 2,747 04-06-2015, 02:04 PM
Last Post: Naresh
  Error while opening test run results vkalyankar 3 4,003 11-12-2014, 09:49 AM
Last Post: vinod123
  Help getting Sender Name from Email nidhitaneja 0 1,983 06-15-2014, 09:03 AM
Last Post: nidhitaneja
  Clicking a link in an outlook email using QTP kirti 0 5,376 06-15-2014, 01:25 AM
Last Post: kirti

Forum Jump:


Users browsing this thread: 1 Guest(s)