2009-07-15 13:44:00
/ [QuickTest Professional]
下面是用VBS编写的关于QTP自动发送Email的代码:Function SendMail(SendTo, Subject, Body, Attachment)Set ol = CreateObject("Outlook.Application")Set Mail = ol.CreateItem(0)Mail.to = SendToMail.Subject = SubjectMail.Body = BodyIf(Sttachment"") ThenMail.Attachments.Add(Attachment)End IfMail.Sendol.QuitSet Mail = NothingSet ol = NothingEnd FunctionCall SendMail("test@sina.com", "qtTest.name", "qtTest.LastRunResults.Status", "").
查看(1888)
评论(16)