Micro Focus QTP (UFT) Forums
Regarding Email sending from one user to another -Important urgent - 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: Regarding Email sending from one user to another -Important urgent (/Thread-Regarding-Email-sending-from-one-user-to-another-Important-urgent)



Regarding Email sending from one user to another -Important urgent - siri - 10-15-2009

HI All ,

After a long back posting thread .Please help[ me in finding the option .

I have a script for sending an email from one user to another .The below mentioned is the script.

Code:
Set objEmail = CreateObject("CDO.Message")

objEmail.From = "sirisha.guntur@ge.com"
objEmail.To = "Arnot.Heron@ge.com"
objEmail.Subject = "Test script passed successfully "
objEmail.Textbody = "Server1 is no longer accessible over the network."

objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "amermsx.med.ge.com"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update

objEmail.Send


When i execute this script error is poping u[ on the screen AS "Transport faield to connect server"

How canm i rectify the problem .
Niranjan help me in thsi regards ASAP .


RE: Regarding Email sending from one user to another -Important urgent - manabh - 10-15-2009

I think only passing an SMTP server value will do this. Besides make sure the machine, you are using to send CDO mails, are having SMTP settings done on it in IIS. I am also using such CDO functionality & initially I use to give those 3 parameters, "SendUsing", "SMTP Server", "SMTP Server Port" & it was working fine. But later our IT department migrated our mail server to Outlook 2007 & then we had to remove the other 2 parameters except "SMTP Serve".
Try doing this & let me know....


RE: Regarding Email sending from one user to another -Important urgent - siri - 10-15-2009

Hi
Code:
Set objEmail = CreateObject("CDO.Message")

objEmail.From = "sirisha.guntur@ge.com"
objEmail.To = "swetha.nellore@ge.com"
objEmail.Subject = "Test script passed successfully "
objEmail.Textbody = "Server1 is no longer accessible over the network."

objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "amermsx.med.ge.com"
objEmail.Configuration.Fields.Update

objEmail.Send


AS per u said i used the only i used SMPT server and removeed Sending Using and Smtp port
Errror is populating like SendUSing is missing
Error is still coming like "Transport faield connecting server "Please help me i need immediate responses from niranjan too


RE: Regarding Email sending from one user to another -Important urgent - Saket - 10-15-2009

Check you have 'Default SMTP Server' configured on your machine.