Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Email from qtp to Microsoft outlook through vb script
#1
Hi Ankur and All,

I am tryting to send an email notification form qtp to Ms outlook
.
Can any one provide me with some information on this .

I am using the below specified code .Herein an error is populating saying that "The test run cannot continue due to an unrecoverable error.The "SendUsing" configuration value is invalid."for the objmessage.send function can any one help me


Code:
Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Simple plain text CDO example" objMessage.From = "sirisha_guntur@yahoo.com" objMessage.To = "test objMessage.TextBody = "This is a test." objMessage.Send
Reply
#2
Are you using Quality Center.
If so i have a solution for you.
Reply
#3
Hi Surya,

Yes i have QC option
Reply
#4
I think you need to add the below lines to your above code

Code:
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "your smtp server name" objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objEmail.Configuration.Fields.Update
Reply
#5
If you have QC Connection and Your QC is properly configured with all the Mail ReLay setteings

Code:
QCUtil.QCConnection.SendMail "Sentto@mycompany.com", "sentfrom@mycompany.com", "Subject", "Body", "my attachment"

Will send a mail directly
Reply
#6
what surya_7mar no reply
Reply
#7
i already sent a reply
Reply
#8
Hi

Object required: 'QCUtil.QCConnection' error is coming if i use QC and qtp
Reply
#9
Did your QTP connected to QC.
Reply
#10
I just tried it is working find for me...

Try only the below one...
Code:
QCUtil.QCConnection.SendMail "yourmailsid@mycompany.com"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Send automatic email notification when test run started helmzshelmz 0 1,605 04-03-2020, 07:54 AM
Last Post: helmzshelmz
  How to attach HTML file to Email Naresh 0 3,435 04-06-2015, 02:04 PM
Last Post: Naresh
  Help getting Sender Name from Email nidhitaneja 0 2,395 06-15-2014, 09:03 AM
Last Post: nidhitaneja
  Clicking a link in an outlook email using QTP kirti 0 6,016 06-15-2014, 01:25 AM
Last Post: kirti
  How do I save name and email address in QTP ? Shiv Y 1 2,898 12-19-2013, 07:24 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)