Pular para o conteúdo principal

Fix notification sending failures

This page shows how to test Signer notification sending and how to fix the failures of each channel. To configure the channels, see E-mail server (SMTP), SMS sending and Whatsapp.

How to test sending​

To test e-mail sending:

  1. Restart the application after you change the Email section.
  2. Create a document and add as a participant an e-mail address you can read.
  3. Check the inbox and the spam folder of that address.
  4. If the e-mail does not arrive within a few minutes, look for the failure in the log and in Hangfire (see Where failures show).

To test SMS without sending SMS, see Test SMS with the simulator.

Where failures show​

Signer sends each notification (e-mail, SMS or Whatsapp) in a background job. If sending fails:

  • The application log records Error sending notification <id> with the channel's error: the exception from the SMTP server, the SMS provider's response or the error the Meta API returned. See how to read the log on Linux or on Docker.
  • Hangfire tries again, up to 10 times. After the last attempt, the notification gets the failed status. To see the jobs, sign in as a system administrator and click Hangfire in the administration menu. The dashboard opens at <SiteUrl>/hangfire. Jobs waiting for a new attempt are in the Retries tab. Jobs that ran out of attempts are in Failed.

E-mail (SMTP)​

If the e-mail does not arrive, look in the log for the exception from the SMTP server (see Where failures show).

Office 365 (Exchange Online)​

Signer authenticates to the SMTP server with a user name and password (basic authentication). It does not use OAuth for SMTP. To send through Exchange Online:

  1. Use ServerHost = smtp.office365.com, ServerPort = 587 and EnableSsl = true.
  2. Use in SenderAddress the same address as the Username mailbox. If the sender is another address, the Username mailbox needs the Send As permission on it.
  3. Ask the Microsoft 365 administrator to enable SMTP AUTH on the mailbox Signer uses. If the tenant uses Microsoft Entra ID security defaults, SMTP AUTH is disabled.

If the log shows an error such as 535 5.7.139 Authentication unsuccessful, Exchange Online rejected the authentication. Check the password and the settings above.

warning

Microsoft announced the retirement of basic authentication for SMTP AUTH in Exchange Online. An app password also uses basic authentication. See Microsoft's current timeline. If your tenant no longer accepts basic authentication, use another SMTP server (for example, an internal relay), Amazon SES or SendGrid.

SMS​

If the provider rejects the request, the log records the provider's response, and Hangfire tries again (see Where failures show).

Test SMS with the simulator​

Use the Simulator provider in a staging environment. It does not send SMS. It only writes the send to the application log.

{
"SMS": {
"Enabled": true,
"Type": "Simulator"
}
}

If the message does not show in the log, set the Information level for the Lacuna.Commons.SmsSender category:

"Serilog": {
"MinimumLevel": {
"Override": {
"Lacuna.Commons.SmsSender": "Information"
}
}
}

Do not use Simulator in production. Signers do not receive the code.

The provider answers 403​

If the log shows HTTP status code 403 (for example, NAO AUTENTICADO), the provider rejected the credential:

  1. Generate a new key in the provider's dashboard.
  2. Replace the credential in the SMS section (for example, ChaveKey for SMS Empresa).
  3. Restart the application.
  4. Send the SMS again and check the log.

Whatsapp​

If Whatsapp messages do not arrive and e-mail works, check these points in order:

  1. Check that the Whatsapp Business account is assigned to Lacuna Software as a technology partner, with Full Control (see Configuring the technology partner). The assignment is required. If you changed or created another Whatsapp account, assign the partner again.

  2. Check that the account has approved templates with the names Signer uses, in the three languages:

    TemplateMeta categoryWhen Signer sends it
    authenticationcodeAuthenticationElectronic signature authentication code
    pendingsignatureUtilityNotice of a document waiting for signature

    If you registered a template with another name, set the name in Whatsapp:TemplateMapping (see the Whatsapp settings).

  3. Search the log for Error sending notification <id>. It carries the error the Meta API returned. See Where failures show.

note

A Whatsapp message that did not come from Signer (for example, one sent by the system that creates documents through the API) does not show in the Signer log. If the Whatsapp integration is not configured on the instance, Signer sends no Whatsapp message.

See also​

View as Markdown