Email graphs using OTA API
This section provides an example of how to email a selected graph from the Analysis View using OTA API.
Note: To help ensure optimal system performance, we recommend that you trigger no more than 10 emails at a time.
'Connect to OTA
Set tdc = CreateObject("TDAPIOLE80.TDConnection")
tdc.InitConnectionEx "server url"
'Connect to project
tdc.ConnectProjectEx "domain name","project name","user name","password"
'Get analysis item
set oFactory = tdc.AnalysisItemFactory
SET obj = oFactory("item id") // analysis item id
'Send email
obj.mail "to email address", "cc to email address-optional", 0, "Email Subject", "Email contents"
'Logout and disconnect from server
tdc.logout
tdc.Disconnect