Adding SMTP settings to the Spotfire.Dxp.Worker.Automation.config file
When you add the Send Email task to a Spotfire Automation Services job, you must also manually add the SMTP settings to the Spotfire.Dxp.Worker.Automation.config file and assign the new configuration to a service running Automation Services.
Before you begin
Procedure
- On the computer running Spotfire Server, open a command line as an administrator and change the directory to the location of the config.bat file (config.sh on Linux). The default location is <server installation directory>\tomcat\spotfire-bin.
-
On the command line, export the service configuration that you want to modify from
Spotfire Server by using the
export-service-config command. Specify the service's capability and the deployment area, and optionally the configuration name.
Note: By default, all new services receive a "Default" configuration. The properties of the default configuration cannot be changed, but you can edit the configuration files and save the resulting configuration with a new name.Important: If you are editing a service configuration that has been applied to an existing service, you must verify the name of the active service configuration before you export it. If the name of the active configuration is not "Default", you must specify the name in the export command. To find the name of the active service configuration, see "Viewing the name of the active service configuration" in the Spotfire Server help.Example for exporting the "Default" Spotfire Automation Services configuration that is in the Production deployment area:
Example for exporting a customized configuration:config export-service-config --capability=AUTOMATION_SERVICES --deployment-area=Production
config export-service-config --capability=AUTOMATION_SERVICES --deployment-area=Production --config-name=AutomationServicesConfiguration
The configuration files are exported. By default, these files are saved to the <server installation directory>\tomcat\spotfire-bin\config\root directory. -
Open the
Spotfire.Dxp.Worker.Automation.config file in a text editor or XML editor, and locate the following section:
<preferences> <!-- SMTP Host for Email Notification --> <add name="Spotfire.Automation.SendMail.SMTPHost" value="smtp.company.com" /> <!-- From Address for Email Notification --> <add name="Spotfire.Automation.SendMail.FromAddress" value="TsasService@company.com" /> <!-- Timeout (seconds) for the library import operation for the Import Library task --> <add name="Spotfire.Automation.LibraryImport.TimeoutInSeconds" value="300" /> <!-- Timeout (seconds) for the library export operation for the Export Library task --> <add name="Spotfire.Automation.LibraryExport.TimeoutInSeconds" value="300" /> </preferences>
-
Edit the following two settings:
- Replace the value of
Spotfire.Automation.SendMail.SMTPHost
with the SMTP host for email notification. - Replace the value of
Spotfire.Automation.SendMail.FromAddress
with the From address for email notification.
Note: For information on other Automation Services settings that you can configure, see the topic "Spotfire.Dxp.Worker.Automation.config" in the Spotfire Server help. - Replace the value of
-
On the command line, import the customized configuration file back into
Spotfire Server and name the configuration by using the
import-service-config command.
Note: If the configuration to be imported was created from the default configuration, a new name must be specified.Important: Importing customized configuration files without the
--config-name
parameter overrides the default configuration.config import-service-config --config-name=ServiceConfiguration
- Optional:
On the command line, assign the created configuration to an existing Automation Services service:
config set-service-config --service-id=value --config-name=ServiceConfiguration
Tip: Use the list-services command to obtain the service ID.Note: Alternatively to step 6, you can assign the new configuration to a service by editing the service in the Nodes & Services section of the server's administration interface .
Parent topic: Send Email