<p data-start="146" data-end="169">Hello dear community,</p><p data-start="171" data-end="359">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.</p><p data-start="361" data-end="513">My first idea was to use <strong data-start="386" data-end="408">simpleUserNotifier</strong> for the <b><em data-start="417" data-end="422">add</em> </b>operation. However, I was not able to find a way to access the newly generated password.</p><p data-start="515" data-end="698">As an alternative, I used <strong data-start="541" data-end="568">accountPasswordNotifier</strong>, 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.</p><p data-start="700" data-end="973">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 <em data-start="896" data-end="915">isWelcomeMailSent</em>, and setting it to <em data-start="935" data-end="941">true</em> once the email has been sent.</p><p data-start="975" data-end="1240">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 <em data-start="1214" data-end="1219">add</em> operation context?</p><p data-start="1242" data-end="1264">Best regards,<br data-start="1255" data-end="1258">
Mike</p>