Skip to content. | Skip to navigation

Personal tools
You are here: Home Help Center FAQs
Document Actions

FAQs

Up to Table of Contents
Frequently Asked Questions

Set a specific e-mail From address

How do I set the default "from" email address?

Use a specific "From" address for email sent by Form Folder (PloneFormGen) instead of the default webmaster@louisville.edu

Form folder replyto defaults

One stock field is called replyto and contains a valid email address. I want this address to be in the From: line - not just in Reply-To:. So I could fill in a TALES expression to overwrite the default sender-address. But what's the correct TALES expression for that?

By default, PloneFormGen's mailer sends mail with a default "From" address set (no-reply@ louisville.edu or webmaster@ louisville.edu). But, you may wish to use another.

Use the reply to e-mail address field

To use the address filled-in for the "replyto" email address field, edit the mailer adapter, and in the overrides sub-form, set the Sender Expression to:

        request/form/replyto

Set a specific E-mail From address

You could also specify a literal or a specific 'From" address:

        string:test@mysite.org

Be cautious about using user-submitted addresses for the "From" address. It's important that the "From" address be a real one, owned by a responsible person. For example, you may want to use a custom validator to ensure the person uses a louisville.edu email address.

Get the ULink UserID when a form is submitted

There are times in Form Folder (PloneFormGen) when you may want to automatically grab user info from a logged-in user.

Add a string field to your form folder.

Add the following to the override section of the string field to get a person's ULink UserID if they are logged in:

python:here.portal_membership.getAuthenticatedMember().getUserName()

You may want this to be a hidden field.

Ensure people are logged-in

You'll probably want to make sure the person is logged-in. At UofL, you would first create a folder (maybe call it "Authenticated Forms"), then change the State of that folder to Require Login. Put your Form Folder inside the Authenticated Forms folder. This will require any user who wants to fill-in the form to first log-in.