We use controller page templates für Online Forms so that we can use captchas (and not recaptcha as for Easy Form, which is unsave).
We call as action a script containing context.MailHost.send(..) to create a mail.
It worked fine, but now the form requires a login from anonymous users. Why?
Do I need any special permission in Zope?
I once did it, but I used:
api.portal.send_email(
OK, Thanks a lot. I will try that.
Anyway I would like to know, why context.MailHost.send(..) does not work any more without authoraization.
It is protected with the "Use mailhost services" permission: Products.MailHost/src/Products/MailHost/MailHost.py at master · zopefoundation/Products.MailHost · GitHub
Plone assigns this permission to the "Site Administrator" role, which would prevent anonymous users from running a script that sends mail with this method: Products.CMFPlone/Products/CMFPlone/profiles/default/rolemap.xml at master · plone/Products.CMFPlone · GitHub
As far as I can see, nothing changed recently about this in Plone. But perhaps you had customized this permission to grant it to the Anonymous role, and later ran a Plone upgrade step which re-applied the settings from rolemap.xml.
Thanks a lot, David. That was the info, that I needed. I just changed the security settings under ZMI für using mail host to anonymous and now it works fine