[solved] No verification mail when creating user via plone.api

Hello everybody,

I create some users via plone.api. Everything works as expected. Except there is no verification mail sent to the user. Do I miss something? Is there somehow a secret switch for this?

System is Plone 6 Coredev, E-Mail is set up (and works well). Instance uses email as username. If I create a user via UI (Classic) there is a checkbox for this (default is checked) and I get the verification mail.

My code looks like this:

user = api.user.create(
    email='first.last@domain.com',
    properties=properties,
)

Properties (example above) is a dict containing the fullname. Nothing special? Any ideas?

Cheers
Stefan

I think you should call the notification explicit like

registration_tool = api.portal.get_tool('portal_registration')
registration_tool.registeredNotify(member_id)
1 Like