Skip to Content
0
Former Member
Mar 16, 2012 at 02:21 PM

How to get destination settings of SMTP from CrystalReportsJobServer

29 Views

Hi,

I want to get the destination settings, I already set, of SMTP from CrystalReportsJobServer by code. I just write some code, but receive always null values:

 IInfoStore iStore = (IInfoStore) session.getAttribute("InfoStore");    iStore = (IInfoStore) boEnterpriseSession.getService("", "InfoStore");    IInfoObjects managedInfoObjects = iStore.query("Select SI_DEST_SCHEDULEOPTIONS, SI_PROGID "                + "From CI_SYSTEMOBJECTS Where SI_NAME = 'CrystalEnterprise.Smtp'");    for(int j = 0; j < managedInfoObjects.size(); j++)            {                ISMTP mail = (ISMTP) managedInfoObjects.get(j);                ISMTPOptions mailOptions = (ISMTPOptions)                    mail.getScheduleOptions();            outString += mailOptions.getDomainName() + "<BR>";            outString += mailOptions.getSenderAddress() + "<BR>";            outString += mailOptions.getServerName() + "<BR>";                             outString += mailOptions.getPort() + "<BR>";            outString += mailOptions.getSMTPAuthenticationType() + "<BR>";            outString += mailOptions.getSMTPUserName() + "<BR>";            }

Also the select statement shows just null values, though I configure the CrystalReportsJobServer! How can I get the values? What are the mistakes in the coding?

Thanks and best regards,

Dirk