Hi,
Please use the below code you can pass the test reports(as attachments) .
Please let me know for further clarification.
Regards,
Venkat.Batchu
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