Dim objOutlook
Dim objOutlookMsg
Dim olMailItem
' Create the Outlook object and the new mail object.
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
Set mapi = objOutlook.GetNameSpace("MAPI")
' Define mail recipients
objOutlookMsg.To = "[email=wang.haiqin@feg.cn]wang.haiqin@feg.cn[/email]"
objOutlookMsg.CC = "[email=wang.haiqin@feg.cn]wang.haiqin@feg.cn[/email]"
objOutlookMsg.BCC = "[email=wang.haiqin@feg.cn]wang.haiqin@feg.cn[/email]"
' 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 objOutlook = Nothing
Set mapi = Nothing