unable to send email using citrix server
I am trying to send email using vbscript but I am getting "ActiveX component can't create object: 'Outlook.Application' " Error. our outlook application open through citrix server. Here is my code
<font class="small">Code:</font><hr /><pre>
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
objOutlookMsg.To = "email@example.com"
objOutlookMsg.CC = " "
objOutlookMsg.BCC = ""
objOutlookMsg.Subject = "test"
objOutlookMsg.Body = ""
objOutlookMsg.Attachments.Add "Y:\Performance Team\Environment Respository\Regression Automation\RES (RESULT)\FR.xls"
Any suggestion how can i fix this problem.
Re: unable to send email using citrix server
Do you have Outlook published with the same desktop you are accessing QTP from? If not, its not going to be able to access the outlook client.
But rather than opening up another program, which seems kind of patchwork, why don't you just send mail via SMTP?
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = "QTP@company.com"
objMessage.To = "firstname.lastname@example.org"
objMessage.TextBody = "The test results are as follows..."