Micro Focus QTP (UFT) Forums
Email from qtp to Microsoft outlook through vb script - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Email from qtp to Microsoft outlook through vb script (/Thread-Email-from-qtp-to-Microsoft-outlook-through-vb-script)

Pages: 1 2 3


Email from qtp to Microsoft outlook through vb script - siri - 07-29-2008

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



RE: Email from qtp to Microsoft outlook through vb script - surya_7mar - 07-29-2008

Are you using Quality Center.
If so i have a solution for you.


RE: Email from qtp to Microsoft outlook through vb script - siri - 07-29-2008

Hi Surya,

Yes i have QC option


RE: Email from qtp to Microsoft outlook through vb script - surya_7mar - 07-29-2008

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



RE: Email from qtp to Microsoft outlook through vb script - surya_7mar - 07-29-2008

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


RE: Email from qtp to Microsoft outlook through vb script - siri - 07-29-2008

what surya_7mar no reply


RE: Email from qtp to Microsoft outlook through vb script - surya_7mar - 07-29-2008

i already sent a reply


RE: Email from qtp to Microsoft outlook through vb script - siri - 07-29-2008

Hi

Object required: 'QCUtil.QCConnection' error is coming if i use QC and qtp


RE: Email from qtp to Microsoft outlook through vb script - surya_7mar - 07-29-2008

Did your QTP connected to QC.


RE: Email from qtp to Microsoft outlook through vb script - surya_7mar - 07-29-2008

I just tried it is working find for me...

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