Alert activity sending delivery fails with “Error while compiling script”

Explore the steps to resolve the Adobe Campaign Classic issue where the alert activity delivery fails with Error while compiling script ‘SMTP headers’ line XX: recipient is not defined.

Description description

Environments

  • Adobe Campaign Classic v7 (ACC v7)
  • Adobe Campaign Classic v8 (ACC v8)

Issue

The alert activity sending delivery fails with the following error:

Failed Unreachable Error while compiling script ‘SMTP headers’ line XX: recipient is not defined. SCR-160012 JavaScript: error while evaluating script ‘SMTP headers’.

Steps to reproduce:

  1. Configure a workflow that uses an alert activity.

  2. When the workflow runs, the alert activity fails.

  3. Open the delivery created for the alert and check the delivery log. The following error is noticed:

    Failed Unreachable Error while compiling script ‘SMTP headers’ line XX: recipient is not defined. SCR-160012 JavaScript: error while evaluating script ‘SMTP headers’.

Resolution resolution

Follow these steps to resolve the issue:

  1. Open the delivery created to send the alert and check the SMTP tab.
  2. Under the Additional SMTP headers, identify if custom headers that use the recipient schema are used.
  3. Once confirmed, correct either the delivery template (if the Additional SMTP headers were added directly under it) or the typology rule that adds the SMTP headers.

Cause

The delivery for sending alerts uses custom SMTP headers based on the recipient schema. However, since alerts are sent to operators rather than recipients, the operator schema should be used instead.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f