Settings for the Email activity
The Email Web.config file controls these features:
▪the choices of record counts per page
▪words and characters to be ignored when Email validates input in the advanced Select field on the Participants tab of the “Email settings” dialog
▪the uniqueness check for the sample field used to store the date and time that an email was sent.
It is in this folder: C:\InetPub\wwwroot\SPSSMR\ManageEmail.
Number of records that are displayed on each page
You can configure the choices of how many records to display on each page of the Participants tab for the email job. The choices are displayed when you click Update View Settings. The default choices are: 25, 50, 100, 500, or 1000; the default value is 25. To display different choices, set this parameter:
<appSettings>
<add key="numberofitemsperpage" value="25, 50, 100, 500, 1000" />
</appSettings>
Validating select and update commands
You can extend the validation of the text that you can enter in the Selection Criteria box when you click Update View Settings on the Participants tab in the Email settings dialog
The default validation checks that:
▪a Select has been requested
▪there is only one command being executed.
For example, the following text is invalid, because it contains two commands:
SELECT * FROM table_name WHERE Queue='FRESH'; DROP table MySampleTable
The validation that is specified in the ManageEmail Web.config file should be sufficient to guard against most invalid SQL. It is:
<add key="advancedvalidation" value="SHOWPLAN_ALL|SHOWPLAN_TEXT|\r|\n"/>
This statement rejects SELECT or UPDATE strings that contain SHOWPLAN_ALL, SHOWPLAN_TEXT, \r (carriage return), or \n (new line). SHOWPLAN_ALL and SHOWPLAN_TEXT are specified as invalid because they can be used to prevent Participants from examining the validation plan.
To prevent other text patterns in the SELECT or UPDATE strings, add the text pattern to the end of the definition. For example, to prevent the word MyText appearing in a SELECT or UPDATE string, type:
<add key="advancedvalidation" value="SHOWPLAN_ALL|SHOWPLAN_TEXT|\r|\n|MyText"/>
This validation happens on both the client and the server computers.
Disabling the uniqueness check for the email sent time
By default, the value in the “Write date and time that email was sent into sample field named” list must be unique across all email jobs for a project. The field is checked for a value before sending an email, to ensure that an email can be sent both an invitation and a reminder.
However, if you do not want to check for uniqueness, set EnableDuplicateStampFieldCheck to False, like this:
<appSettings>
<add key="EnableDuplicateStampFieldCheck" value="false" />
</appSettings>
See also