QTP自动发邮件

上一篇 / 下一篇  2007-07-18 17:47:48 / 个人分类:QTP学习心得

http://www.51testing.com/?3528/action_viewspace_itemid_5211.html

http://bbs.51testing.com/viewthread.php?tid=54183

Dim objOutlook
Dim objOutlookMsg
Dim olMailItem
' Create the Outlook object and the new mail object.
Set ōbjOutlook = CreateObject("Outlook.Application")
Set ōbjOutlookMsg = objOutlook.CreateItem(olMailItem)
Set mapi = objOutlook.GetNameSpace("MAPI")
' Define mail recipients
objOutlookMsg.To = "gzj08@126.com"
'objOutlookMsg.CC = "my@email.com"
' objOutlookMsg.BCC = "my@email.com"
' Body of the message
objOutlookMsg.Subject = "QTP Test Mail"
objOutlookMsg.Body = "This is a test mail"
'Display the email
objOutlookMsg.Display
' Send the message
objOutlookMsg.Send
' Release the objects
objOutlook.quit
Set ōbjOutlook = Nothing
Set mapi = Nothing


TAG: QTP学习心得

 

评分:0

我来说两句

日历

« 2024-05-12  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 26160
  • 日志数: 17
  • 图片数: 2
  • 建立时间: 2007-01-16
  • 更新时间: 2007-11-27

RSS订阅

Open Toolbar