In a PloneFormGen form you will notice that when someone submits a form that the email address of the Plone site appears in the "From" area of the resulting email. If you have a lot of submitters this can be a headache because you want to see the name of the person in "From" area of the email NOT the plone site email address. As long as you have form fields name "first-name"& "last-name" you can have that information appear in the "From" area. This is how you do it.
- Create a PloneFormGen form
- Create two fields a "First" and "Last" name field (make sure you know what their short names are. In my case it was "first-name and last-name"
- Open up your "Mailer" adapter
- Choose "Overrides"
- Put this expression in the "sender expression" string:${request/form/firstname} ${request/form/lastname} <${request/form/replyto} >
- Of course if you only want one of those fields just don't include the one you dont want OR if you wanted the email of the person instead change the string such that its using the name of the email field.. ex string:${request/form/email}
NOTE
While this works in Apple mail. if you view this in "Gmail" you will see (unknown sender). So id suggest requesting the email field instead of the name if that will be an issue for you or your users.