IF a mail contains certain text RRS feed

  • Question

  • How can I do an IF statement to work out if a mail contains certain text.

    For example:

    If a mail contained the words "Yours Sincerely" then a message box appears.

    Monday, December 21, 2015 5:05 PM


  • Hello Darryl,

    You need to check the Body property value for the text specified. For example, you may use the String.Contains method which returns a value indicating whether a specified substring occurs within this string - true if the value parameter occurs within this string, or if value is the empty string (""); otherwise, false.

    Read more about all possible ways of working with message bodies in the Chapter 17: Working with Item Bodies article.

    Monday, December 21, 2015 5:49 PM