UserNotification event handler - email body always empty in 3.13

Hello,

thank for this great application !

The UserNotification event handler sends emails correctly (subject is received), but the email body is always empty, even with plain static text like “Hello” and no variables.

Environment:

  • privacyIDEA version: 3.13

  • OS: Ubuntu 24.04 LTS

  • Web server: Apache2

  • Database: MySQL

Steps to reproduce:

  1. Create a new Event Handler with:

    • Event: token_init

    • Handlermodule: UserNotification

    • Action: sendmail

    • Position: post

  2. Set body to any text, for example: “Hello” (no variables)

  3. Set subject to: New token enrolled for {username}

  4. Enroll a TOTP token for a user

Observed behavior:

  • Email is received

  • Subject is correct and variables are resolved

  • Body is completely empty

Verified:

  • The body value is correctly saved in the database (eventhandleroption table, Key='body', Value='Hello')

  • The subject works fine with and without variables

  • The same behavior occurs with mimetype=plain and mimetype=html

  • Log shows Mail sent: {} with no errors

Is this a known bug in 3.13? Any workaround?

thank advance

regards

Vincent