PloneFormMailer
PloneFormMailer is a mail forum designer for a Plone info at plone.org
Download the package from the Collective on Source Forge
The package used was !PloneFormMailer-0.2.2-RC1.tar.gz
Install the files into /plone/data/products. You don't have to use /zope/products and storing it in the Plone data/products folder keeps all the customisations in one nice place.
FAQ (from FAQ.txt)
FAQ.txt from the !PloneFormMailer package provides useful hints as to how to use PloneFormMailer, the following should work "out of the box".
- How do I get the form to send an email to a well known account?
Go to tab
edit
-> sub-tabMail Header
and fill in the Recipient's e-mail address field like the expression in the following example:string:youremail@something.org
- How can I disable the text field which might be used to include a message?
Go to tab
modify form (zmi)
, this brings you to the Formulator Form view of your ploneformmailer object.Select the
message (your message)
part and uncheckenabled
andrequired
to disable and not display message text field. - How can I add a checkbox query into the form?
Go to tab
modify form (zmi)
, this brings you to the Formulator Form view of your ploneformmailer object.Select !CheckBoxField from the list beside the
Add
button on the Formulator Form view, give it an ID and Title, select Save Changes.The form will now display a checkbox with the Title as a label. Return to the zmi to tweak, e.g. to add a description.
- How can I send an additional e-mail to the address in the e-mail field ?
Go to tab
edit
-> sub-tabMail Header
and fill in one of the cc or bcc lines using the following expression:python:request.get('field_email')
- How can I send an e-mail to the currently logged in user ?
Got to tab
edit
-> sub-tabMail Header
and fill in one of the cc or bcc lines with the following expression:python:member.getProperty('email','')
- How do I add a PloneFormMailer portlet ?
Create a PloneFormMailer object in the root of your plone site (or anywhere in the acquisition path of the place the portlet should appear) and give it the id
pfmbox
(it has to bepfmbox
because that is what the slots code looks for).Where you want the portlet to appear, in the zmi, use the
properties
tab and edit the right_slots (or left_slots) property to addhere/formmailer_portlet/macros/portlet
- How do I allow an anonymous visitor to fill in a mailer form?
First, allowing this is risky, make sure you have the permission of the recipient that the mailer form sends to before allowing this.
Second, this is doubly risky if you configure the form to send cc or bcc mails to others, including the email address acquired in 'python:request.get(
field_email
)'. Imagine a malicious anonymous user employing your mailer form to send spurious emails to whatever email address they enter in the email field!If you need to allow this, go to tab
modify form (zmi)
, this brings you to the Formulator Form view of your ploneformmailer object. Select thesecurity
tab and check the box for anonymous role against theSend !PloneFormMailer Form
permission.