RackForms v7.8.8
simple email
Site Tag Line
Latest Release: Build 958 - Arpil 18th, 2023
Contact Us  Purchase Options Purchase Options Contact Us

Top Link
Sortable Page Simple Email

In Brief: Send the result of this form to an email account(s).

Dependencies: A valid email account and email delivery ability on your web server.

Hints & Tricks: This module can be easily used for sending user data to a list server or other email client applications.

As RackForms supports a wealth of various email formatting options, please see here for a complete description of each.

Get Dynamic! RackForms allows us to create dynamic recipients and from fields. To do so we simply wrap the Name/Value of an existing form field in the standard RackForms pound sign token: #{field_name}. So for example, if we had a form field named: name, we would use this token: #{name}. This will, at run time, replace the token with the live value of the form field.


Email Message Composer

The Email Message Composer is a convenience feature that allows adding custom content to what would normally be an automatically generated email message. This feature and its use is identical to the Email+ module, only instead of only a custom message being generated, a table or table like display of data is displayed as well. This feature thus allows us the convenience of an automatically generated table, with the customization of custom content.

Simple Email Message Layout

This option defines the display type of our generated email content.

Table: The mode means we take all submitted form content across all pages of the job and create a table-based layout of all questions and responses. This mode makes it incredibly easy to submit all responses with no additional work.

Form Layout: This mode uses the general layout of the original web form to display all responses across all pages of the job.

It's important to note the Form Layout option overrides all other layout options defined in the Email Delivery section, such as Simple Email Table. In other words, we can think of Form Layout mode as a separate, custom layout option.

Important: One very important consideration is this mode should never be used with multiple page input forms, and especially not with job that contain more than one free form page. This is because RackForms jobs can contain many pages, and the output process has no way of knowing which type of page layout the field items have originated from. What's more, each page in a multi-page job can contain different layouts. Thus, it's safest to assume and design forms that use this mode to only be single page that use the same layout.

Styling Form Layout Content: When using Form Layout mode our content tries to mimic, as closely as possible, the original web form layout. For Sortable pages this means a standard list of items, and for Free Form pages, the custom layout where items can be placed in arbitrary locations.

Not all styles are respected, however, as most email clients will not support the same expansive set as a full web browser. Thus, RackForms takes some liberties with styling, such as add a class name and default style to the values. RackForms applies the following style rules to add output:

• All content is given 10px of padding, and is wrapped in a relative position DIV.
• Input values from user content is assigned the (undefined) class: .email-item-value
• A global body style is applied: color:#000000; font:14px Arial, Helvetica, sans-serif; padding:5px;

Taken together then, we can add our own styles within a proper <style></style> block.

Custom Email Message

When used, this content is appended to the top or bottom of the automatically generated content as defined by Simple Email Message Layout, and any associated options under Email Delivery.

The core use of this feature is to add custom content to our emails which help the receivers of the email to better understand what this message is. For example, we may with to add a block of content describing contest entry rules, and so on.

It's very important to note the content in these blocks is not styled. Thus, it's always best to experiment and add styles as needed to match the generated content. Three styles in particular you may want to match are, for table layouts, the table styles:

    font:14px Arial, Helvetica, sans-serif;

.name { color:#999999; font-family:Arial, Gadget, sans-serif; font-weight: bold; width:60%; } 
.value { color:#529BCC; font-family:Arial, Helvetica, sans-serif; font-weight: bold; }

Please note content added to this area can be any valid HTML your target audiences email clients can display.

Custom Message Position

This options defines the position of the content added in the Custom Email Message block. Top places content at the very start of the message, before the result table, Bottom the opposite. As noted above, neither option is styled, meaning we'll usually want to add some styling for better readability and aesthetic display.


Basic Attributes

Design Notes
These are notes you can input that help you and other production staff understand your confirmation elements logic and purpose. This text is never used in the live form in any way, it is only for internal development.

Confirmation/Query Condition

Confirmation Condition PHP Code

This field allows you to specify a condition which must be met for the confirmation field to be processed.

We can create code manually, or use the Condition Wizard.

Condition Wizard

If you're new to using conditions, or simply want to have RackForms generate the condition code for you, the wizard is a fast and easy way to do so. To create a confirmation condition, simply follow the wizard from top to bottom.

Start by mousing over the This Field: select item. All fields in your form will display, select the item you want to base the condition on.

Please note if we select a Checkbox field an additional select item will display, Having This Checkbox Value (optional):. This select item will display all possible values for that checkbox. Select which value you want to base the condition on. When you do, the condition process is complete.

For all other fields, the next step is to set the Must: field. This will take the value of Equal or Not Equal, and several others.

Finally, type into the This Value: box to set which value the form field we selected above will validate against.

If you want to add additional conditions, such as a name must be Equal to Steve and age less than 10, first select the Additional Condition button and start from the top of the wizard again.

Hand Coding Conditional Code

The logic takes the form of:

Variable 1 | Condition | Variable 2

For example, let's assume we have a radio item in our form with the Name/Value of opt_1. The radio item has two possible vales, 'Yes' and 'No'. If the value of opt_1 is 'Yes' we want to send an email, if no, we do not.

We would write the Confirmation Condition PHP Code as such:

#{opt_1} == 'Yes'

In other words, we use the token for our field variable like we would in other property boxes, that is, a pound sign (#) followed by the Name/Value of the field in braces. Recall that at run time this token evaluates to the value set by our forms users, which in this case will be the value of the radio button with the Name/Value of opt_1.

We then set the comparison, in this case out comparison is equal too, denoted with the double == sign. Finally, because we know our radio item is a string value that can be 'Yes' or 'No', we wrap the value we want to check for in single tick marks.

On the raw code side, RackForms wraps the token call in an isset() block, which is further wrapped in the proper PHP if() syntax:

if(isset($_SESSION['qs']["{$_SESSION['entry_key']}"]['opt_1']) && $_SESSION['qs']["{$_SESSION['entry_key']}"]['opt_1'] == 'Yes') { // condition code start

When run, if the users set value for the radio box was 'Yes', we would process this confirmation element.

Using Array Based Form Elements (Checkboxes)
PHP Treats checkbox items a little differently than other elements. The good news is the only element that needs this special attention is a checkbox field. The difference then, is that in order to use checkbox items we need to place an index indicator just after the form field name.

For example, lets say we have a checkbox field with the Name/Value: email_condition, and it has two elements: Recipient A and Recipient B

To process this field in our condition statement we append the proper index in the format of [index-number]. It's quite simple when you see it in practice:

#{email_condition[0]} == 'Recipient A'

#{email_condition[1]} == 'Recipient B'

Please note the [0] and [1]. These are the index positions of the field being checked. Compare this to a standard field token:

#{email_condition} == 'Recipient A'

A checkbox group has several items, the [0] and [1] bit tell RackForms which number item to grab.

How do we know which number to use? In our example the checkbox field has two values, and array indexs start with 0. Thus, the first field, Recipient A, is [0], and Recipient B is [1].

The rule then is our numbering simply adds 1 for every checkbox item in the group, and always starts at 0.

Email Delivery

Dynamic Token Notice
Fields labeled as Dynamic in the editor now support the full RackForms 2 token set. This means we can use POST, GET, SESSION, FORM FIELD, and other such variables to populate the fields via: P{}, G{}, S{}, F{}, and ${}

To: email recipient(s)

In most circumstances you'll simply input a comma delimited list of email addresses. RackForms will then email a copy of the Form's elements in name=value format.

You can however, get more involved by using dynamic variables, those form values as identified by the id attributes of form element(s) previously defined on form pages.

For example, you could have a text field with an id of user_name. To include the user defined value of this field in your email, wrap the field 'id' in the stndard RackForms token format like so:


Now at runtime RackForms will parse the submitted value of this field element and include it in the list of email recipients.

For best results, it is recommended to include all dynamic variables first, then any hard-coded email address as in:

#{user_name}, sample@yahoo.com

Notice the use of the space between the dynamic variable and the hard-code email. This is not strictly needed, but it does make reading a list of addresses easier.

Note: One requirement you must meet is each dynamic variable must be separated by a space.

New to Build 705, we can now use the handy Email Address Quick Select feature to quickly add saved email address to our To: field. This feature also allows us, as you would expect, to add and remove email address items at will.

SMS Carrier List

New to Build 694, this shortcut field allows us to easily select the most popular email addresses for sending SMS text messages. This allows you to send alerts to your mobile device the same as if you typed a text message directly on your phone.

It is important to note that unlike sending text messages from your phone, RackForms will by default want to send HTML based messages. For smart phones like Android and the iPhone that have build in HTML capabilities this should be fine. For most other phones however, your message will not be viewable, as these devices do not support HTML content. Thus, as the note below this field suggests, you'll want to click the Send as Plain Text (located below this field), as that way RackForms will only send plain text messages, which are guaranteed to be viewable by any mobile device.


Best supplied as an email address, however, this can be regular text. However, some servers, particularly shared hosting accounts or improperly configured dedicated servers, will need to have an email address only, as if not, the server will automatically append the servers name and domain to any value you input here.

The best method to determine your servers configuration is to simply create a sample form using email and see what happens when you leave the From: field blank. If you do get a domain name and server, contact your web host and ask them how and if you can edit the php.ini file to set a default From: address. The php.ini line looks like:

sendmail_from = me@example.com

This field is dynamic, which means you can assign any field that is not an array to process at form submission time as the emails 'from' property. Each dynamic element needs to be in token form, that is, #{token}, where 'token' in the Name/Value attribute of a form element.

From Name
As of Build 705 we can now use 'pretty' display names for the From Name: field. That is, normally when an email is sent we would just supply an email address to the From: field. Now we can specify a display name for the email as well.

This will show up in the email program's From: field as John Smith instead of jsmith@yahoo.com.

Care should be used when specifying a display name however, as a common spam technique is to use a 'fake' From Name: value.


The subject line of your email message.


A list of recipients to Carbon Copy this message on.


A list of recipients to Blind Carbon Copy this message on.

Please be aware that due to possible limitations in the PHP mail() command, your Bcc recipients might need to be on different domains. Thus, Bcc's to user1@host.com and user2@host.com may not work as expected. Please be sure to test out the form before deploying in a production setting.

Reply To

This field allows is to set the reply-to property of the email such that when the email is sent, when we click the receivers email client reply button this is the address the email will be set as the send to address.

Email Label/Value | Item Separator

This option has two different meanings depending on what context you use it in. In the case of Simple Email submissions, the content is exactly as described below. However, if you are using the Email+ module, the usage is slightly different. Please see the Email+ module documentation for more information.

RackForms sends the values of your Simple Email as:

{field label} : {value}

To ease in reading form submissions, by default, RackForms uses a colon : sign to delimit the {field label} and {value}

For example, a field in RackForms that has the label:

Your Name

Entered with 'Matthew' by a user, would like this when sent in an email:

Your Name : Matthew

If you want a different delimiter such as a (pipe |)  (dash -) or any other character(s) include spaces, enter them in this box.

Format Email To Work Best With:

This option is mainly to provide a workaround for Microsoft Outlooks use of its Word HTML rendering engine. When set to Outlook mode we thusly use TABLE elements to present results, whereas Everything Else mode uses liquid DIV's and CSS 3. This is the mode best suited for Mobile devices in particular.

Simple Email Table (Simple Email Only)

Instead of a simple name value pair, you can have have RackForms create an HTML table that makes reading and manipulating from submissions easier. Please be aware, this checkbox only has an effect with the Simple Email module. This option is selected by default.

Although not widely used now, the table is styled with a CSS 3 nth-child selector, meaning when Email clients finally catch up, alternating rows will have a different color for easier reading.

Send as Plain Text
This option allows you to set whether or not your email message is sent as plain text or HTML. If you do check this box, you should be aware of how the various email settings effect the final output. At very minimum, we'll usually want to check this box when sending SMS messages, as most phones do not support HTML based text messages.

Let's assume we have two fields, Text 1 and Text 2, that hold the values: Value 1 and Value 2. The first two scenarios are when we have the checkbox checked, the second are unchecked (and thus, HTML email).

Scenario 1 - Plain Text With No Simple Email Table
Your email will be sent with each field separated with the the Email Label/Value | Item Separator you choose with each line \r\n terminated as:

Text 1 : Value 1
Text 2 : Value 2

Scenario 2 - Plain Text With Simple Email Table
In this case RackForms will create a "mock" table using \t\t and \r\n elements as:

Text 1		Value 1
Text 2		Value 2
Please notice the extra space between each element (the double tab: \t\t), and the fact that we do not use the separator anymore.

Scenario 3 - HTML With No Simple Email Table
In this case RackForms will create your email with HTML formatting applied. Using the same example input from above, the code created and sent would be:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test plain text Simple Email</title>
Text 1 : Value 1<br />
Text 2 : Value 2<br />

Scenario 4 - HTML With Simple Email Table
In this final scenario we will create HTML code that also uses a CSS3 based alternating row colors. The code created would be:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test plain text Simple Email</title>
<style type="text/css">
tr:nth-child(even) {
.name { font-family:"Arial Black", Gadget, sans-serif }
.value { font-family:Arial, Helvetica, sans-serif }
<table width="100%" border="0" cellpadding="3">
<td valign="top" class="name">Text 1</td>
<td valign="top" class="value">Value 1</td>
<td valign="top" class="name">Text 2</td>
<td valign="top" class="value">Value 2</td>

Interestingly enough, the only email client at the time of this writing to support CSS3 was the Mac Version of Office 2007's Entourage. That said, ass CSS3 gains acceptance more clients will offer native support.

Ignore (Skip) Empty Items (Simple Email Only)

This option tells RackForms to skip any item in Simple Email that has been left empty by the user. This can be very handy for large forms that may have similarly large number of option fields.

Email Priority

Some Email Clients allow you to set the urgency of the email message, RackForms supports the full Microsoft Exchange Server set with 'Highest' through 'Lowest'. Normal is selected by default, keeping this setting means email sent through FromBoss will show up without any priority coding.

Mark As To Do?

Some Email Clients allow messages to be tagged with 'to do' status, in the case of Exchange, this means a small red flag appears next to the message. Check this box to send RackForms email with this setting enabled.

Include user originated file attachments?

A powerful feature, checking this box means any File Upload elements that have the Save For Email Attachment / Flat File Data? checkbox checked will be sent as attachment components to your email message. This option works with HTML and plain text messages.

A common use of this would be classified ad placement for a newspaper web site, contest entry forms where users supply an image, or any other use where an email+file combination is desired.

Please note again: you must check the Save For Email Attachment / Flat File Data? checkbox and any file upload item you want included with the email message!

Include Digital Signature File Attachments?

Checking this option tells RackForms to include any Digital Signature Images created in the form as file attachments. This option is disable (unchecked) by default, as more likely than not such an attachment will have a very specific purpose not suited for most email delivery.

Include PDF File Attachments?

This checkbox tells RackForms that any pages we've defined with the Page PDF Output Properties > PDF Output Mode set as: Save For Email Output will be attached to the email being sent.

Static Attachment Name

This item, along with Static Attachment Path, lets us attach items to the email that are not user-originated, that is, files that come from the web server. This field sets a custom name for this item, essentially overriding the default behavior of just using the normal file name.

Please note that if no value is placed in this box then the file name as defined by it's path is used.

Static Attachment Path

This item defines the full path of an item we wish to attach to our email message. This path can be absolute:


Or relative:


The key of course is the path must be valid!

If the path is valid then that file, when the form is submitted, will be attached along with any user-defined items. This feature is thus very useful if we wish to provide our form users with a default file of some sort, such as a thank you package, 'next steps' message, and so on.

We can also pass a directory name here, and if so, all files within that directory, save for dot files, will be attached to the email. Use caution with this setting, in particular when using dynamic values.

Delete Static Attachment File After Sending?

When checked, any single files we've defined in the static attachment list will be removed after sending. For securities sake, this is not applicable to folders, only individual files.

Email Character Set

This field sets the character set of the email, both in terms of HTML charset declarations, and in the actual email body proper.

In most cases the default of UTF-8 will suffice, however, some European users may find one of the ISO methods will produce better results. Please consult the Wikipedia Entry on Character Encoding for more.

Email Encoding

In most cases the default of 8bit will suffice, however, when using standard PHP mail() with HTML messages, we may need to switch this quoted-printable, as sometimes letters will go missing form the email message, or new ones added.

Encode Carriage Returns as HTML?

This feature lets us encode line breaks and carriage returns as <br/> tags, which is useful if we want to keep a users original formatting. This feature is now enabled by default, though any jobs from older builds will need to have their email fields activated at least once for this setting to be used.

Additional Email Headers

Use this box to fill in any additional email headers your email client or CRM might require for security or other purposes. As a general rule, we do not want to use quotes (") in this box. Also, if adding more than one custom header, be sure to separate each with a comma!

Show Email Debug Info? (Formerly known as: Show SMTP Debug Info)

Check this box to show detailed Email/SMTP debug messages, which can help when setting up a relay for the first time, or with general email delivery messages.

Email Note:

All email from RackForms is HTML formatted Unless The Send as Plain Text Checkbox is Checked.

Email SMTP

You can use SMTP to send email. There are two three reasons why you would want to use this type of delivery:

1 - Security. SMTP allows SSL or TSL.

2 - Your web hosting provider, be it paid or in-house, doesn't allow the standard PHP email mechanism (mail()) to be used. Most of the time this is for security reasons.

3 - You're on personal computer and want to send test emails in a development environment. Windows and several other OS's aren't configured to send email by themselves, so unless you have a SMTP client of some sort installed or access to an Exchange Server, POSTFIX or so on, you cannot send php mail() on your local machine. Thus, we can use RackForms SMTP to relay mail to your web hosting provider, bypassing the no email client (MTA) problem.

Use SMTP Delivery

Unless this box is checked, RackForms will attempt to use the standard mail() command. Checking this box means all mail will be handled via the SMTP module, which means in order for mail to work you will need to configure the additional settings outlined below.

SMTP Server Address (server:port)

The contents of this field will depend on whether your SMTP relay uses authentication or not. If they do (as is the case with Google's Gmail), you will need to supply a domain name and postfix it will a port number, separated by a colon. For example Gmail would use:


If your web hosting provider allows for SMTP relay (they almost always do), your IP address which is dolled out by your provider will act as the authentication mechanism, and thus you may not need to use a secure port, and you can instead use:


Important: A port number will almost always be required when using SMTP delivery, so please be sure to check your email providers documentation for the proper value to use.

SMTP Username

If so required, this is the user name of your SMTP user account. On Google, this is your email address.

SMTP Password

The password of your SMTP relay.

SMTP Transfer Mode

Select from None, SSL, or TSL. For web service provider SMTP relay's you can generally leave this set to None. For Google Gmail, you would select SSL. Many corporate environments will use TSL.

Important Gmail SMPT Considerations

By default, Gmail may block attempts to use your account on remote web servers, and in particular, RackForms Cloud Hosting. If mail is not being sent, first log in to your Google account and check your security settings. If an account sign in was blocked you'll find a handy notification to that effect, complete with location of the login attempt and other details. If the server IP in the blocked list originated on your server, you can safely click the "That Was Me" button.

For RackForms Cloud Hosting users, you'll almost always find an entry for the following IPv6 or IPv4 address:

IPv6: 2600:3c00::f03c:91ff:fe67:7736

This is the RackForms cloud Hosting server IP address, so you can safely click the "That Was Me" button to allow access. Access from any other IP address is not from RackForms Cloud Hosting.

SSL Certificate Verification

This option controls how encrypted email methods are verified. The default is to verify SSL certificates, which means when using SSL or TLS, PHP first checks the servers certificate and makes sure it matches the servers domain name. If it doesn't the email fails. For most productions servers this should not be an issue, though it may require some setup, which you can read about here and here.

Alternatively, you may wish to send test emails on a local server that doesn't have an SSL certificate installed. If this is the case we can set this option to No, which means ignore any certificate issues.

So many features, So little time