Customize the From Address

by Sam Knox last modified Dec 30, 2008 05:51 PM
With a simple override, you can customize the from address that each Mailer Adapter will use to send email.

By default, PloneFormGen will use your site-wide email address as the from address for sending email. This address can be changed through the ZMI or Plone Control Panel depending on your version of Plone. However, this is a single global address so you cannot specify a from address for a single form in this way. Instead you must use a simple override in the Mailer Adapter of your form.

Edit your Mailer Adapter and click on the Overrides tab. You should see a screen like the one below.

mailer-adapter-overrides.gif 

Notice the Sender Expression field. Paste this line of code into that field, where 'your address' is simply the email address you wish to use for the From address.

string:your address

Be sure to Save before navigating away from this page.
Note that you can set a custom From address for each mailer in your Form Folder.