[SOLVED] Collective.contentrules.mailtogroup versions

I need to send mail to a group.

I see that collective.contentrules.mailtogroup works in Plone 5.1

Does anyone know how much work is required to get it to work for 5.2 ?
Alternatively: Is there any other similar product / way ?

1 Like

I see that there is a branch for python3 that has been updated 8 months ago.

try to ask @agitator if it's ready or need some love :wink:

Py3 by agitator · Pull Request #30 · collective/collective.contentrules.mailtogroup · GitHub works for me :wink:

Thanks.

UPDATE: it works for me, too. Thanks

UPDATE 2: I did a test on python2.7 / Plone 5.2, and I dont think any of the branches works. @agitator ping me if the py3 branch is supposed to work with 2.7/5.2 and I will try to troubleshoot.

UPDATE 3: The 'old version' seem to work on 5.2 / 2.7, but maybe it has problems with unicode errors (I did a quick test on an existing site and it gives error (and it has ÆØÅ in name and usernames etc, and removing them fixes the error):

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 274, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module plone.z3cform.layout, line 63, in __call__
  Module plone.z3cform.layout, line 57, in update
  Module z3c.form.form, line 281, in render
  Module z3c.form.form, line 163, in render
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 61, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 378, in __call__
  Module z3c.pt.pagetemplate, line 176, in render
  Module chameleon.zpt.template, line 302, in render
  Module chameleon.template, line 192, in render
  Module 968fead4cf629b09d90e80bb315df6ac, line 117, in render
  Module 00ac4c8414cdcee1f3f20dd5b63850fa, line 1922, in render_titlelessform
  Module 00ac4c8414cdcee1f3f20dd5b63850fa, line 488, in render_fields
  Module 00ac4c8414cdcee1f3f20dd5b63850fa, line 145, in render_widget_rendering
  Module 00ac4c8414cdcee1f3f20dd5b63850fa, line 1166, in render_field
  Module zope.tales.expressions, line 250, in __call__
  Module Products.PageTemplates.Expressions, line 225, in _eval
  Module Products.PageTemplates.Expressions, line 155, in render
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module zope.browserpage.viewpagetemplatefile, line 81, in __call__
  Module zope.browserpage.viewpagetemplatefile, line 49, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 378, in __call__
  Module z3c.pt.pagetemplate, line 176, in render
  Module chameleon.zpt.template, line 302, in render
  Module chameleon.template, line 215, in render
  Module chameleon.template, line 192, in render
  Module 23b9bc38728b56351dfab04232bb2985, line 586, in render
  Module 23b9bc38728b56351dfab04232bb2985, line 456, in render_widget_wrapper
  Module zope.tales.expressions, line 250, in __call__
  Module Products.PageTemplates.Expressions, line 225, in _eval
  Module Products.PageTemplates.Expressions, line 155, in render
  Module plone.app.z3cform.widget, line 123, in render
  Module plone.app.widgets.base, line 180, in __init__
  Module plone.app.widgets.base, line 229, in _set_items
  Module lxml.etree, line 1024, in lxml.etree._Element.text.__set__
  Module lxml.etree, line 747, in lxml.etree._setNodeText
  Module lxml.etree, line 735, in lxml.etree._createTextNode
  Module lxml.etree, line 1540, in lxml.etree._utf8
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

 - Expression: "widget/render"
 - Filename:   ... rm-3.2.2-py2.7.egg/plone/app/z3cform/templates/widget.pt
 - Location:   (line 39: col 46)
 - Source:     ... xt" tal:replace="structure widget/render"
                                              ^^^^^^^^^^^^^
 - Expression: "widget/@@ploneform-render-widget"
 - Filename:   ... rm-3.2.2-py2.7.egg/plone/app/z3cform/templates/macros.pt
 - Location:   (line 99: col 81)
 - Source:     ... place="structure widget/@@ploneform-render-widget"/>
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "context/@@ploneform-macros/titlelessform"
 - Filename:   ... ctive/contentrules/mailtogroup/actions/templates/mail.pt
 - Location:   (line 1: col 24)
 - Source:     ... k use-macro="context/@@ploneform-macros/titlelessform" />
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x7f1636cbcd20>
               context: <SelectWidget 'form.widgets.members'>
               views: <zope.browserpage.viewpagetemplatefile.ViewMapper object at 0x7f1636bfa350>
               modules: <zope.pagetemplate.engine.TraversableModuleImporter object at 0x7f165a836a90>
               args: ()
               nothing: None
               target_language: None
               default: <DEFAULT>
               request: <WSGIRequest, URL=http://myserver:8080/christiegaarden/++rule++rule-2/+action/plone.actions.MailGroup>
               loop: {}
               template: <zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile object at 0x7f1645223850>
               translate: <function translate at 0x7f1636cfaed8>
               options: {}
               view: <Products.Five.browser.metaconfigure.RenderWidget object at 0x7f1636bfa2d0>