Skip to main content

i4connected Knowledge Base

Configuring the Report Emailing Settings

Abstract

Learn how to configure the i4connected email settings for delivering reports, by checking out this step-based tutorial.

This article describes how to configure email settings for delivering reports.

In order to deliver the reports using the email service, the proper settings must be done in the Reporting Server configuration file. The settings must address the location of the Reporting Server, the database connection string, and the actual email settings.

  1. Open the WEBfactory.DWH.Reporting.Server.exe.config file located in the Reporting server installation directory (by default at C:\Program Files\WEBfactory\Data Warehouse\WEBFACTORY\Reporting) using the preferred text editor.

    Capture4371.jpg

    WEBfactory.DWH.Reporting.Server.exe.config file

  2. Locate the SqlReportingServerHost key under the <appSettings> node and add the SQL Reporting server host in the Value attribute. If the path is already existing, make sure that it is the correct one.

    <appSettings>
    ...
          <add key="SqlReportingServerHost" 
    value="http://pemstestsql/ReportServer/"/>
    ...
    </appSettings>
  3. Locate the DataWarehouseSQLConnectionString key under the <connectionStrings> node and make sure that the connectionString attribute points to the correct database.

    <connectionStrings>
            <add name="DataWarehouseSQLConnectionString" connectionString="Data Source=pemstestsql;Initial Catalog=WEBfactory.DWH.Data.Database;Persist Security Info=True;User ID=sa;Password=webfactory" providerName="System.Data.SqlClient" />  
    </connectionStrings>
    
  4. Locate the <mailSettings> node under the <system.net> node. Here you can configure the SMTP and Network parameters for sending the emails:

    SMTP parameters

    from

    The email address used for sending the reporting emails. This must be a valid email address.

    deliveryMethod

    The delivery method is used for sending emails. For sending report emails, the Network delivery method must be used.

    Network parameters

    host

    The SMTP mail server hostname is used to send emails.

    port

    The SMTP port. When not using SSL, the default port is 25. When using SSL, the default value is 587.

    enableSsl

    Enable or disable SSL secure communication (true/false). The default value is false. The Port must be adjusted when setting the enable SSL parameter to true.

    userName

    The SMTP user name.

    password

    The SMTP password.

    defaultCredentials

    Enable or disable the usage of default credentials (true/false). The default value is false.

    DefaultCredentials represents the system credentials for the current security context in which the application is running. If the UseDefaultCredentials property is set to false, then the value set in the Credentials property will be used for the credentials when connecting to the server. If the UseDefaultCredentials property is set to false and the Credentials property has not been set, then mail is sent to the server anonymously

    You can find out more about the <smtp> element here: <smtp> Element (Network Settings).

    You can find out more about the <network> element here: <network> Element (Network Settings).

    Example with SSL:

    <system.net>
    	<mailSettings>
    		<smtp from="report.webfactory@mailprovider.com" deliveryMethod="Network">
    			<network host="smtp.mailprovider.com" port="587" enableSsl="true" userName="report.webfactory@mailprovider.com" password="samplepwd" defaultCredentials="false" />
    		</smtp>
    	</mailSettings>
    </system.net>

    Example without SSL:

    <system.net>
    	<mailSettings>
    		<smtp from="report.webfactory@mailprovider.com" deliveryMethod="Network">
    			<network host="smtp.mailprovider.com" port="25" enableSsl="false" userName="report.webfactory@mailprovider.com" password="samplepwd" defaultCredentials="false" />
    		</smtp>
    	</mailSettings>
    </system.net>
  5. After all the settings are done, the Reporting Server service needs to be restarted. Open Services.msc, locate the WEBFactory DWH Reporting Server service, and restart it (right-click > restart).