Search code examples
ploneplone-4.xploneformgen

Set PloneFormGen to send mail to a group of users


I have a form created with PloneFormGen and a group of users in my plone website. How to configure Mailer Adapter Recipient Expression (in myform/mailer/edit - Overrides) to send mail to this group of users?


Solution

  • Unluckily I don't think you can use plone.api methods here as you are in the restricted python

    Try something like:

    python:[user.getProperty('email') for user in object.portal_groups.getGroupById('YOURGROUPID').getGroupMembers()]