'*****************************************************************
'脚本说明:将运行结果发送邮件
'*****************************************************************
Dim SendTo, Subject, Body, Attachment
'SendTo ="test@163.com;test1@163.com" '发送多个邮箱以分号分割
SendTo ="test@163.com"
Subject ="自动化测试结果"
Body ="自动化测试结果"
Attachment =ReportLocation&"测试结果1.html"
'SendMail SendTo, Subject, Body, Attachment
Function SendMail(SendTo, Subject, Body, Attachment)
Dim ol,Mail
Set l=CreateObject("Outlook.Application")
Set Mail=ol.CreateItem(0)
Mail.to=SendTo
Mail.Subject=Subject
Mail.Body=Body
If (Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End If
' Mail.display '邮件显示
Mail.Send
ol.Quit
Set Mail = Nothing
Set l = Nothing
End Function