Upgrading to Form-to-Email Pro

TTG galleries including mail functionality – the Contact page in TTG CE2 Pages, and feedback submission in TTG CE2 Client Response Gallery – utilize the free PHP mail script from http://formtoemail.com/. The Form-to-Email script is powerful, secure and well-supported, hence our decision to include it in the CE2 framework.

The Form-to-Email script is available in two versions. The free version included in TTG web engines is the lesser of the two, but adequate for most needs. For $29, a Pro version is available with many additional features. For information and a list of features specific to Form-to-Email Pro, please visit http://formtoemail.com/formtoemail_pro_version.php.

Should you wish to upgrade your web engines – TTG CE2 Pages and TTG CE2 Client Response Gallery – to use Form-to-Email Pro, these are the steps you should take:

Step 1

Rename the Pro version file. In TTG web engines, the file name for the Form-to-Email script should be FormToEmail.php. Renaming the Pro version file ensures that we need not edit the source code of our galleries.

Step 2

Edit the file so that our email address and continue hyperlink may be set from within Lightroom. This step requires some very simple manipulation of the script's code. It's really easy, so don't stress.

The top of the Form-to-Email Pro script looks like this:


error_reporting(E_ALL ^ E_NOTICE);


Thank you for purchasing FormToEmail-Pro by FormToEmail.com

Add the code shown on line 3 below; you can copy-and-paste from this page:


include "set_email.php";

error_reporting(E_ALL ^ E_NOTICE);


Thank you for choosing FormToEmail by FormToEmail.com

Next, locate and “comment out” the following two lines of code by fronting them with //:

$my_email = "delete these words and put the email address(es) only, in here between the quotes";
$continue = "/";

Should become:

// $my_email = "delete these words and put the email address(es) only, in here between the quotes";
// $continue = "/";

Commenting out these lines disables them from the script; we will be setting these parameters from within Lightroom via the set_email.php file we included at the top of the script on line 3, and so we do not need these. That's why we disable them.

Step 3

Run through the Form-to-Email Pro script and configure whatever options you'd like to use. Options are all documented within the script, so it's pretty easy to enable the Pro version features you've paid for.

Step 4

Once you've completed the above modifications and configured your Pro-version features, you should backup the script in a safe place. Anytime you download an update for either TTG CE2 Pages or TTG CE2 Client Response Gallery, you will want to update the new engine version with your Form-to-Email Pro script, so keep it safe and keep it handy.

Step 5

Copy the Form-to-Email Pro script into the web engine.

You will need to open the .lrwebengine package installed to your Web Galleries folder. On Windows, you should be able to double-click the .lrwebengine package to open it as a folder; on Mac, CTRL-click the .lrwebengine package and select “Show Package Contents” from the menu.

You will find the Form-to-Email script at:


Replace the existing version of the script with your modified Pro version. The Pro version file name should be the same as the existing version, so you will get an overwrite notification; overwrite the existing file.

Step 6

Very, very important: test your script before deploying your changes in a production environment. Run a test gallery, attempt to use the form and verify that all is in working order before you put it out there for clients to use.