Send Email

Email Addresses

The Email Addresses step specifies which records to use when sending the email(s) and which email addresses to use.

When the button containing this action is within a Record control, an email can be sent only for the current record.  If the button containing this action is within a Table control, an email can be sent for each selected record or for all records.  Please note that ‘All records’ includes records that may not be currently displayed on the page.  For example, if the filtered set includes 50 records but only 10 are currently displayed on the page, selecting this option will send emails for each of the 50 records.

Options

Description

Send email for

Send email for selected set of records. There are 3 options available:

Current record (first selected, clicked or displayed)

Send an email for first selected or clicked record in the table control or for the currently displayed record in the record control.

All selected records

Send an email for each selected record in the table control. This option should not be used for buttons placed in record controls.

All records

Send an email for each record in the table control, using the application user’s current filter selections.  This option should not be used for buttons placed in record controls.

You can enter only one “From” email address since an email may have only one sender.  If you already have an email address in the From field, press the From... button to edit the existing email address.  If the From field is empty, press the From... button to add a new email address.

 

Options

Description

Email address

An email address can be a simple text string, a substitution variable or a field value.  Text string email addresses are used exactly as specified in the Constant field.  Substitution variables are placed in the Constant field and are evaluated after the button click at application run-time.  When evaluated, a data value is substituted for the substitution variable.

See Button Actions - Substitution Variables for further details on how substitution variables are handled.

Email display name

The email display name is optional.  If nothing is specified, the display name is the same as the email address.

Display names can be simple text strings, a substitution variable or a field value.  Substitution variables are placed in the Constant field and are evaluated after the button click at application run-time.  When evaluated, a data value is substituted for the substitution variable.

See Button Actions - Substitution Variables for further details on how substitution variables are handled.

 

Email Content

The Email Content step specifies the body and content of the email.

Options

Description

Subject

Specifies the email’s subject line.  Use the “Insert variable...” button to insert substitution variables into the subject line text.   The substitution variable will be evaluated at application run-time after the button click and data from the table or record control substituted in place of the variable.

Body Content

Web page

Specifies the web page to be used as the email’s content. 

See Step 2: Redirect URL for more information about the URL.

Text with substitution variables

Specifies the text to be used for the email body.  Use the “Insert variable...” button to insert a substitution variable into the text.  The variable will be evaluated at application run-time after the button click and data from the table or record control substituted in place of the variable.

Images

Specifies how to display images used in the email body.

Referenced by fully qualified URLs

Images and style sheets of the web page are referenced by fully qualified URLs.

Embedded

Images are attached to the email.  Use this option in cases where images cannot be referenced by fully qualified URLs, such as when the message recipient is behind a firewall or when the source of the image is a database.  Note, however, the size of the email will increase when using this option.

Javascript

If your email content contains javascript, the email has a greater chance to be filtered and put into the spam folder. Therefore you have an option to remove or retain javascript when emailing.  The default selection is 'Removed from email'.

When the content of an email is sourced from a URL, your web server must retrieve the page at that URL at run-time. The retrieval of the URL content occurs in a separate session from the one used to process the page.

When the application uses URL encryption, the default encryption key is generated using the session ID of the current session.  Since the encryption of the URL and its decryption occur in different sessions, the URL parameters cannot be successfully decoded using the default encryption key.  This can be fixed by removing the session ID as a component of the encryption key used by the application.

To use encrypted URL parameters while sending email from the application, modify the GetCryptoKey() function in the Crypto class of the Data Access Layer of the application as follows:

Private Function GetCryptoKey() As String

     Return BaseClasses.Configuration.ApplicationSettings.Current.URLEncryptionKey

End Function

Since the encryption key does not rely on the session ID, the URL parameters can be decrypted in a different session than where they were encrypted.

Finish

The Finish step shows a summary of the button actions to be added.