DevaV
14 years agoContributor
Sending mail from java script
Hi,
I want to send mail from java-script and I use the following code in test-complete it throws exception while creating ActiveXObject for Outlook.Appliction. Code is given below
Kindly give some suggestions for this.
I want to send mail from java-script and I use the following code in test-complete it throws exception while creating ActiveXObject for Outlook.Appliction. Code is given below
function SendMail()
{
var theApp
var theMailItem
var subject = "Email Using JavaScript"
var msg = "This is a test mail,sent to you using javascript by kushan thakershy"
try
{
var theApp = new ActiveXObject("Outlook.Application")
var theMailItem = theApp.CreateItem(0)
theMailItem.to = "deva.vgd@gmail.com"
theMailItem.Subject = (subject);
theMailItem.Body = (msg);
theMailItem.display()
}
catch(err)
{
Log.Message(err)
}
}
Kindly give some suggestions for this.