概要
Automation Servicesでは、SMTPサーバーを設定することでメールを送信することができます。(「電子メール送信」タスクを使用)
本記事では、Automation Servicesに対して、SMTPサーバーとの連携設定を実施し、テストメールを送信する手順について説明します。
検証環境
製品 | バージョン | 備考 |
---|---|---|
Spotfire Server / Node Manager | 14.0.4 | Windows Serverで実行 |
Amazon SES | ― | SMTPサーバーとして利用 |
Automation Servicesサービス設定エクスポート
Spotfire Serverインストールフォルダへ移動
cd C:\spotfire\spotfireserver\14.0.4\tomcat\spotfire-bin
デフォルト設定エクスポート
export-service-configコマンドを利用し、設定をインポートします。
.\config.bat export-service-config --capability=AUTOMATION_SERVICES --deployment-area=Production --platform=WINDOWS -t <Configuration Toolパスワード>
本記事では、デフォルト設定をエクスポートします。
※デフォルト設定ではなく過去に変更した設定を使用している場合は「Automation Servicesサービス設定変更手順」の手順をご参考に使用中の設定をエクスポートしてください。
設定ファイル編集
エクスポートされたファイル.\config\root\Spotfire.Dxp.Worker.Automation.config
をテキストエディタ等で開き編集します。
設定例(該当箇所を抜粋)を以下に示します。
<smtp port="587" useTls="true" timeoutSeconds="100">
<authentication useWindowsDefaultCredentials="false" username="smtpuser" password="xxxxxxxx" />
<certificates useCertificates="false" storeLocation="LocalMachine" storeName="My" serialNumber="" />
</smtp>
<!-- Force embedding of data function based data sources, such as On-demand. -->
<saveAnalysis forceUpdateBehaviorManualWhenEmbeddingData="true" />
<preferences>
<!-- SMTP Host for Email Notification -->
<add name="Spotfire.Automation.SendMail.SMTPHost" value="email-smtp.ap-northeast-1.amazonaws.com" />
<!-- From Address for Email Notification -->
<add name="Spotfire.Automation.SendMail.FromAddress" value="noreply-spotfire@nttcoms.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" />
<!-- A file path that can be used when exporting images, PDFs and data from the different tasks to the file system. -->
<!-- This path can be inserted into the different paths using the Insert Field in Job Builder dialog. -->
<!-- Note the path must be a fully qualified path like '\\server\share' and not a relative path. -->
<add name="Spotfire.Automation.Common.ExportPath" value="" />
</preferences>
デフォルト設定から変更した箇所を太字にしています。
設定箇所や設定値は利用するSMTPサーバーによって異なりますので、ご注意ください。
編集前後の差分は以下のようになります。(左:編集前、右:編集後)
上の画像は新しいタブで開くと見やすくなります。
設定インポート
import-service-configコマンドを利用し、.\config\root\Spotfire.Dxp.Worker.Automation.config
に記述した設定をSpotfire ServerのリポジトリDBにインポートします。
.\config.bat import-service-config --config-name=as_config_smtp_nttcoms -d -t <Configuration Toolパスワード>
Automation Servicesサービス設定適用
インポートした設定を実行中のAutomation Servicesインスタンスに適用します。
メール送信
Spotfire Analystでテスト用Automation Servicesジョブを作成し、サンプルメールを送信します。
設定したSMTPサーバー経由でメールが送信されることを確認します。