Send Email Assertion

The Send Email assertion allows you to instruct the Gateway to deliver a pre-configured email message whenever the assertion is encountered in a policy.
gateway94
The
Send Email 
assertion allows you to instruct the Gateway to deliver a pre-configured email message whenever the assertion is encountered in a policy.
The placement of the assertion in the policy path determines when and why an email is sent. For example, the assertion could be placed in an "At least one assertion must evaluate to true" assertion folder after an Evaluate Response XPath assertion. If the required response message element is not found and the Evaluate Response XPath assertion fails, then the Send Email assertion will execute.
The Send Email assertion fails if the outgoing email account is configured improperly. To configure the policy so that a failure of the Send Email assertion does not cause a total policy failure, place the assertion in an Continue Processing Assertion.
If you are encountering email timeouts while using this assertion, try adjusting the
mail.outConnectTimeout
and
mail.outTimeout 
cluster properties. For more information, see Email Cluster Properties.

Using the Assertion
  1. Do one of the following:
    • To add the assertion to the Policy Development window, see Add an Assertion.
    • To change the configuration of an existing assertion, proceed to step 2 below.
  2. When adding the assertion, the Email Properties automatically appear; when modifying the assertion, right-click
    Send Email
    in the policy window and select
    Email Properties
    or double-click the assertion in the policy window. The assertion properties are displayed. 
  3. Configure the properties as follows:
Context variables may be used in the following fields for greater flexibility: 
Host
Port
Username
Password
From
To
Cc
Bcc
Subject
.
Setting
Description
Host
The name of the outgoing mail server displayed as the default. Modify if necessary. You may reference context variables.
Protocol
Select the email protocol to use:
Plain SMTP
(default),
SMTP over SSL
, or
SMTP with STARTTLS
. The default setting should be appropriate in most instances. Consult your system administrator if you are unsure of the protocol.
  1. You may need to configure trust for the SMTP server if using the "SMTP over SSL" or "SMTP with STARTTLS" protocols. For more information, see Managing Certificates.
  2. If any error occurs when using
    SMTP with STARTTLS
    protocol, you can enable communication using default SSL implementation by adding a property
    com.l7tech.server.policy.emailalert.useDefaultSsl=True
    in system.properties file. This file is at
    /opt/SecureSpan/Gateway/node/default/etc/conf/
    folder
    Ensure that you restart Gateway after setting the property value to True.
    or
    Add a cluster-wide property,
    email.useDefaultSsl,
    and set it to
    True
    . You do not need to restart Gateway after setting this property.
Port
The port used by the default mail server is displayed. Modify if necessary. You may reference context variables.
Server Requires Authentication
Select this check box if a username and password is required to log onto the email server.
Username
Password
If authentication is required, enter the user name and password. You may reference context variables.
Context variable in password
Select this check box to allow the assertion to correctly recognize context variables used in the Password field; for example, you will be using the
${secpass.*}
context variables. For more information, see Stored Password Properties.
From
Enter the From email address. You may reference context variables.
To
Enter the email addresses of the recipients. Separate multiple addresses with a comma. You may reference context variables.
Cc
(Optional) Enter email addresses for Cc (carbon copy) recipients. Separate multiple addresses with a comma. You may reference context variables.
Bcc
(Optional) Enter email addresses for Bcc (blind carbon copy) recipients. Separate multiple addresses with a comma. Recipients in the 'To' and 'Cc' lists will not see the recipients in the 'Bcc' list. You may reference context variables.
Subject
Enter a subject line describing the email. You may reference context variables.
Format
Select the email text format:
Plain Text
: Select this option to write a simple email with no formatting in the message body. This is the default option.
HTML
: Select this option and use HTML tags in your email to send an email in HTML format.
Important!
We recommend you to avoid javascript and use inline CSS. Some email clients may discard the CSS defined in
<head>
or
<style>
tags.
<body style="background-color: lightblue;">
<h1>Hello world!</h1>
</body>
Enter the email in text area provided below the Format property. You may include context variables within the message, if necessary.
Manage Attachments
Configure one or more attachments to be sent along with the email. All the attachments are listed as comma separated filenames in the Attachments section under the email body area. For more information, see Manage Attachments section below.
Send Test Email
Sends a test email to the recipients. Use this to verify that the settings are correct.
  1. The [
    Send Test Email
    ] button will not work if context variables have been used in the Email Properties.
  2. Attachments are ignored when a test email is sent.
4. Click [
OK
].
Manage Attachments
You can add, edit, or remove multiple attachments to the email by clicking
Manage Attachments
in the
Email Properties
dialog. 
  1. Click
    Manage Attachments
     in the 
    Email Properties
     dialog.
  2. Click
    Add
    or select an exisiting attachment and click
    Edit
    /
    Remove
    to manage the attachment.
    1. Name
      : Specifies the attachment filename.
    2. Source Variable
      : Specifies the configuration details of the attachment. It can be a simple MESSAGE type variable or MIME part of the MESSAGE or multiple MIME parts.
    3. Add an attachment: 
      1. Click
        Add
        in the
        Manage Attachments
        dialog.
      2. Enter attachment filename and the configuration details.
      3. Click
        OK
        .
    4. Edit an attachment:
      1. Select an attachment in the 
        Manage Attachments
         dialog.
      2. Click 
        Edit.
      3. Edit the selected attachment configuration.
      4. Select
         MIME Part(s) Variable 
        checkbox to enable Source Variable to be considered as MIME parts message. The filename is disabled and it is taken from Content-Disposition header of the part(s).
        For example: 
        • Message: request.parts.1, response
        • Multiple MIME Part(s): request.parts
      5. Click 
        OK
        .
    5. Remove an attachment:
      1. Select an attachment in the 
        Manage Attachments
         dialog.
      2. Click 
        Remove
        .
      3. Click
        OK
        .
The assertion fails and you receive warning messages if the attachments cannot be composed.