[midPoint] HowTo: Welcome mail send only once

mikhail.nikolaenko mikhail.nikolaenko at proton.me
Mon Aug 18 12:12:28 CEST 2025


Hello dear community,

We have the following business requirement: when a new user is created, the system must send a welcome email to their private email address containing some text and the initial password.

My first idea was to use simpleUserNotifier for the addoperation. However, I was not able to find a way to access the newly generated password.

As an alternative, I used accountPasswordNotifier, and from there I can send the welcome email with the password. This works, but now I need to ensure that it happens only once.

As soon as the email is successfully sent (sure we could not be sure if it was delivered, but at least send operation has been completed without error), no further emails should be triggered by password changes in midPoint. My first thought was to follow a common approach by using a custom attribute like isWelcomeMailSent, and setting it to true once the email has been sent.

So my question is: how can I modify a person attribute at the moment the email is sent? Is it possible to do this directly from the notification script? Or perhaps I was wrong, and there is actually a way to access the new password in the add operation context?

Best regards,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20250818/d7cef0f0/attachment.htm>


More information about the midPoint mailing list