---
uid: 'rule:email:Sample'
tags: []
type:
  ref: standard
  parameters:
enabled: false
name: Sample
trigger:
  ref: email.imap.message
  type: email.imap.message
  parameters:
criteria:
  trigger.from:
    pattern: johndoe@gmail.com
    type: contains
action:
  ref: core.sendmail
  parameters:
    body: 'We received an email'
    to: janedoe@gmail.com
    from: stackstorm@yourcompanyname.com
    subject: 'Email Received'
ref: email.Sample
pack: email

---
name: Sample
description: "Rule which sends an email when an email from johndoe@gmail.com is received"
pack: email
enabled: false
trigger:
  type: email.imap.message
  parameters: {}
criteria:
  trigger.from:
    pattern: johndoe@gmail.com
    type: contains
action:
  ref: core.sendmail
  parameters:
    body: 'We received an email'
    to: janedoe@gmail.com
    from: stackstorm@yourcompanyname.com
    subject: 'Email Received'

Remove attributes which are not needed when rules are loaded from disk, add description and use a more standard attribute ordering.
Remove attributes which are not needed when rules are loaded from disk, add
description and use a more standard attribute ordering.
