Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fucntion to send mail in outlook works fine in qtpcode but does not work in .vbs
#2
Solved: 10 Years, 9 Months, 1 Week ago
Hi,

Use the below function it works fine...

Code:
Function SendMail(SendTo, SendCC ,Subject, Body, Attachment)
Set ol =CreateObject("Outlook.Application")
Set Mail=ol.CreateItem(0)
Mail.to=SendTo
mail.cc = SendCC
Mail.Subject=Subject
Mail.Body=Body
If (Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End If
Mail.Send
ol.Quit
Set Mail = Nothing
Set ol = Nothing
End Function


Thanks
-Ashok
Reply


Messages In This Thread
RE: fucntion to send mail in outlook works fine in qtpcode but does not work in .vbs - by ashokghali - 08-22-2008, 07:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP integration to build frame-works devries 2 3,305 03-02-2015, 10:50 AM
Last Post: prit deo
  Security Warning in Outlook automation priyaang 2 3,659 02-19-2014, 01:50 PM
Last Post: priyaang
  Not able to send spacebar with End Key to TE nbansal 1 3,393 02-08-2013, 11:31 PM
Last Post: coolguy
  How can I send variable value to html property for descriptive programming in QTP ritugoyal 13 21,746 11-26-2012, 12:55 PM
Last Post: binny318
  vbs funcion to create run time test set log frebuffi 0 2,325 08-27-2012, 07:13 PM
Last Post: frebuffi

Forum Jump:


Users browsing this thread: 1 Guest(s)