email not working through rules and actions in stackstorm

155 views
Skip to first unread message

j&s

unread,
May 6, 2017, 5:33:24 AM5/6/17
to StackStorm
Hi
I was exploring stackstorm for past 1 month and now I got an idea about the functionality of rules and actions and it is really intresting to explore with that.
But now I am trying to send an email through stackstorm email pack,I have Installed email pack in my system and configured the username and password and the mail is sending through that. But now I want those mails to send using the Rules and Actions and I am facing problem with that.Could you please feel free to find a solution for that..

Following Is my Rules
~~~~~~~~~~~~~~~
---
name: emailrulesz
description: "Rule which sends an email "
pack: email
enabled: true
trigger:
  type: core.st2.webhook
  parameters:
      url: email_webhook
action:
  ref: email.send_email
  parameters:
    body: "{{ trigger.body.body }}"
    to: "{{ trigger.body.to }}"
    from: "{{ trigger.body.from }}"
    subject: "{{ trigger.body.subject }}"

Following is the actions
~~~~~~~~~~~~~~~
  ---
  name: "send_email1"
  runner_type: "run-python"
  description: "Send an email."
  enabled: true
  entry_point: "send_email.py"
  parameters:
    email_from:
      type: "string"
      description: "Email to use as FROM."
      required: true
    email_to:
      type: "string"
      description: "Email to send TO."
      required: true
    subject:
      type: "string"
      description: "Subject of the email"
      required: true
    message:
      type: "string"
      description: "Message to send on the email"
      required: true
                                     
-- 
Reply all
Reply to author
Forward
0 new messages