Sending emails from QTP - 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: Sending emails from QTP (/Thread-Sending-emails-from-QTP) |
Sending emails from QTP - AkhilaV - 06-19-2012 Hi, I am trying to send an email from QTP. I called the following function and it displayed an error "The transport failed to connect to the server" when oMessage.Send is called. Can anyone help me in finding the solution for this SendCDOMessage "mymail@mail.com", "mymail@mail.com","Hi","Hi this a mail from QTP" Code: '''================================================================= RE: Sending emails from QTP - sshukla12 - 06-20-2012 Hi, I had used Outlook to send the mail.Use the below code for reference if its useful 2 u: Code: call sendmail("sshukla12@gmail.com","Test Mail","This is a test mail") Regards, Sankalp RE: Sending emails from QTP - AkhilaV - 06-20-2012 Hi Sankalp, Thanks for your reply. It is working fine when I am using CreateObject("Outlook.Application"). But when I use CreateObject("CDO.Message") same error "The transport failed to connect to the server" is displayed when oMessage.Send is called. Do I need to make any settings in my machine when using CreateObject("CDO.Message")? Do we need to set up Outlook for this to work? Thanks, Akhila V RE: Sending emails from QTP - sshukla12 - 06-21-2012 Hi Akhila, I had not used CDO.message, ya but for the code that i suggested u have 2 use outlook...let me have a look on CDO.message and then only I can reply 2 u on that. Till then any memeber in forum who have idea over this might help u. Regards, Sankalp RE: Sending emails from QTP - ssvali - 06-21-2012 Try this... Code: Set myMail=CreateObject("CDO.Message") RE: Sending emails from QTP - QTPScript - 08-29-2012 Hello Please make sure SMTP server is setup perfectly . If you are using Windows 7 then i am sure it will problem. Just setup SMTP correctly. it will work. this is standard code for all the email using SMTP. it is working correctly at my end. Google search term " SMTP configuration windows 7" or replace windows 7 with your operating system. |