Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Send Mail Errors
#1
Solved: 11 Years, 4 Months ago
Hi

Iam using below code in qtp to send myautomation results
my problem here is, when i open outlook the code is working fine
but when i close outlookand run the code its giving general run time error.
at Mail.send, i think basically its not able to choose the profile.

can you please help how to open the profile using qtp code.


Code:
Call fnSendMail()


Public Function fnSendMail()

    Set oUtlookApp=CreateObject("Outlook.Application")
    Set Mail= oUtlookApp.CreateItem(0)
    Mail.to= gstrEmailAddress
    Mail.Subject=gstrEmailSubject
    Mail.Body=gstrEmailBody
'   Mail.Attachments.Add(gstrResultFileName)
    Mail.Send
    'oUtlookApp.Quit
    Set oUtlookApp = Nothing
    Set Mail = Nothing

End Function
Reply


Messages In This Thread
Send Mail Errors - by tmahender12 - 05-16-2011, 03:32 PM
RE: Send Mail Errors - by surya_7mar - 05-24-2011, 02:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send/pass UFT Run Error Dialog as output value to main driver script lravi4u 0 592 11-05-2023, 03:55 PM
Last Post: lravi4u
  Send automatic email notification when test run started helmzshelmz 0 1,078 04-03-2020, 07:54 AM
Last Post: helmzshelmz
  Web Testing and Unexpected Server Errors zunebuggy 0 1,278 01-24-2018, 11:41 PM
Last Post: zunebuggy
  To send Fail Results to mail Naresh 1 2,543 04-23-2015, 08:30 PM
Last Post: babu123
  To send the QTP Results to mail using Thunderbird Naresh 0 2,406 04-03-2015, 03:19 PM
Last Post: Naresh

Forum Jump:


Users browsing this thread: 3 Guest(s)