Add an event command to send an email

Add a command to an event to automatically send an email notification when the event triggers on the HMI device. For example, send an email automatically when a tank reaches or drops below a certain level by adding a
Send email
command to a State Enter or State Exit event. To send an email after pressing a button, add a
Send email
command to a touch press event on the graphic element.
Prerequisites
  • Create an event to automatically trigger the command:
    • Touch Press.
      Occurs when touching the item on the screen that is configured with the event.
    • Touch Release.
      Occurs when releasing the item on the screen that is configured with the event.
    • Key Press.
      Occurs when
      pressing the specified key.
    • Key release.
      Occurs when releasing the specified key.
    • State Enter.
      Occurs when a graphic element, screen, popup, or the System Banner transitions into the selected state through an animation.
    • State Exit.
      Occurs when a graphic element, screen, popup, or the System Banner transitions out of the selected state through an animation.
      IMPORTANT:
      To send an email when a State Enter or State Exit event triggers, verify that the graphic element, screen, popup, or System Banner is configured for
      State Table
      animation.
To add an event command to send an email
  1. Select the graphic element configured with the event.
  2. In the
    Properties
    pane on the
    Events
    tab, select
    Add Command
    .
  3. Expand the
    Messaging
    command category and select
    Send email
    .
  4. Complete the property boxes on the command card:
    • Recipient
      . The email addresses of the email recipients, separated by commas or semicolons.
    • Subject
      . The subject of the email.
    • Message
      . The complete text of the email to send.
    • Status
      . The status of the sent email in Numeric format (DINT). Status does not support binding to element properties. Bind this property to a controller tag to display the status code of the last email sent by the command:
      • Successfully sent: 10. This code indicates the email was successfully sent to all recipients.
      • Error returned from email server: 20. This code indicates multiple errors such as a timeout while sending the email, an incorrect email address, or a communication error with the email server.
      • Unable to reach email server: 30. This code indicates multiple errors such as an invalid password, invalid user name, or invalid server name.
      • Sending is in progress (email added to queue): 40. This code indicates an email is in progress to a recipient.
      • Email request rejected: 50. This code indicates the maximum buffer size of 120 email requests are in queue. Decrease the number of email commands that execute simultaneously.
        TIP:
        Tips:
        • Manually enter values in the property boxes to send a pre-configured static message when the event triggers. Use this method when sending only one or two emails and when entering information directly in the command is preferred.
        • To send a large number of emails with updated information from the system when the event triggers, bind the property boxes to tags in a controller.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal