cancel
Showing results for 
Search instead for 
Did you mean: 

How to send e-mails?

Occasional Contributor

How to send e-mails?

Hi,

I want to know whether I'll be able to send emails from scipts if MS Office is not installed at my system?

I have gone through the help section and tried BuiltIn.SendMail functionality but am unable to send any mail.

What are the requirements or settings I have to chnage on my system in order to send the mails?



Thanks
8 REPLIES
Staff

RE: How to send e-mails?

Hi,


There are no special requirements for your system to send e-mails from TestComplete. Just make sure that you specify the BuiltIn.SendMail method's parameters correctly. If you still cannot send an e-mail using the BuiltIn.SendMail method, check whether TestComplete posts any error message to the test log during the test run.


Besides the SendMail method, you can also use Collaboration Data Objects (CDO) to send e-mails from your scripts. For more information on this, see Sending E-Mail From Scripts in the online documentation.

I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
Occasional Contributor

RE: How to send e-mails?

Hi,

I have tried BuiltIn.SendMAPIMail() function and it is giving an exception. I have also tried to do the same using CDO but facing the same problem.

My Test Complete version is 6.0. Does it support BuiltIn.SendMail() functionality?



Thanks
Staff

RE: How to send e-mails?

Hi,


Unfortunately, TestComplete version 6 does not support the BuiltIn.SendMail() functionality. To use this method, you need to update to the latest version of  TestComplete (v. 8.6).


To help us investigate your problem with the BuiltIn.SendMAPIMail() function, please send us the code you use and the text of the exception.

I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
Occasional Contributor

RE: How to send e-mails?

Hi,

This is the code I am using:



function SendEmail()

{

    if (BuiltIn["SendMAPIMail"]("Amit", "amit10.t@tcs.com", "Notification", "Hello Amit, This is a mail from Test Complete"))

        Log["Message"]("Mail was sent");

    else

        Log["Warning"]("Mail was not sent");

}



I am getting a warning message "Mail was not sent".

My working area provides internet access only to a few limited sites, relating to the organisation.

Is this the reason for the failure in sending?
Staff

RE: How to send e-mails?

Hi,


Your code is correct. So, the problem is not in it.


The fact is that SendMAPIMail interacts with the mail client installed on your computer. Your mail client may incorrectly implement support for the SendMAPIMail functionality. What mail client are you using?

I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
Occasional Contributor

RE: How to send e-mails?



Hi,



I am using Lotus notes. Is there any solution for my problem?



Thanks

RE: How to send e-mails?


Hi Amit,





We haven't tried using TestComplete with Lotus Notes. Also, I'm not very familiar with this product and a quick search on the web does not return any useful information on e-mail clients for Lotus Notes. Could you please give me some more detailed information on the specific name and version of the e-mail client application you use?





BTW, if the non-visual methods do not work properly for you, you can try simply recording the needed GUI actions and sending mails via playing back the corresponding test. This can give you a solution much faster, because if we start investigating the Lotus Notes problem, this can take much time.


Best regards,
Alexey


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓

Join us for SmartBear Community Wintertainment!
Visitor

Re: RE: How to send e-mails?

Hello

 

how did you go about collecting the test report, how did you export

Share Your Stories
Read Latest News
Top Kudoed Authors