title: Perseo events do not seen to fire with NGSI-v2
body: <p>Moro,</p>
  
  <p>we have Orion CB and data (NGSI-V2) like this:</p>
  
  <pre><code>[
      {
          "id": "bloodm1",
          "type": "BloodMeter",
          "hippo": {
              "type": "Number",
              "value": 39,
              "metadata": {}
          }
      }
  ]
  </code></pre>
  
  <p>and a subscription like this</p>
  
  <pre><code>{
          "id": "5ecf6be4e9f143d750cb7d63",
          "description": "Perseo Subscription",
          "status": "active",
          "subject": {
              "entities": [
                  {
                      "idPattern": ".*"
                  }
              ],
              "condition": {
                  "attrs": []
              }
          },
          "notification": {
              "timesSent": 26,
              "lastNotification": "2020-05-28T11:41:54.00Z",
              "attrs": [],
              "onlyChangedAttrs": false,
              "attrsFormat": "normalized",
              "http": {
                  "url": "http://perseo-fe.fiware-dev.svc.cluster.local:9090/notices"
              },
              "metadata": [
                  "dateCreated",
                  "dateModified",
                  "timestamp"
              ],
              "lastSuccess": "2020-05-28T11:41:54.00Z",
              "lastSuccessCode": 200
          }
      }
  </code></pre>
  
  <p>and rule like this:</p>
  
  <pre><code>{
              "_id": "5ecfb70f1d163a0007dd715e",
              "name": "perseo_email12",
              "text": "select \"perseo_email12\" as ruleName, * from pattern [every ev=iotEvent(cast(hippo?,float) &gt; 1)]",
              "action": {
                  "type": "email",
                  "parameters": {
                      "to": "adf.fasdf@asdfator.fi",
                      "from": "mail@asdfator.fi",
                      "subject": "It's The End Of The World As We Know It (And I Feel Fine)"
                  }
              },
              "subservice": "/",
              "service": "unknownt"
          }
  </code></pre>
  
  <p>it seems that the email is not sent. what are we doing wrong? We can see from the peseo backend logs that the event goes there. What should we see in the logs if the action fires?</p>
  
  <p>Is there any way to force some rule to fire? Or test the email (rule out misconfig)?</p>
  
  <p>this is what we see in the core logs:</p>
  
  <pre><code>time=2020-05-28T13:11:19.399Z | lvl=INFO | from=::ffff:192.168.29.199 | corr=b84fca16-a0e4-11ea-9391-167c661b292c; perseocep=121 | trans=51ac0299-4308-47c9-9c1b-ceb99b257c99 | srv=perseo | subsrv=/ | op=doPost | comp=perseo-core | msg=incoming event: {"noticeId":"b8557f60-a0e4-11ea-9861-53e82ada17b4","noticeTS":1590671479382,"id":"bloodm1","type":"BloodMeter","isPattern":false,"subservice":"/","service":"perseo","hippo__type":"Number","hippo":40,"hippo__metadata__dateCreated__type":"DateTime","hippo__metadata__dateCreated__ts":1590671100000,"hippo__metadata__dateCreated__day":28,"hippo__metadata__dateCreated__month":5,"hippo__metadata__dateCreated__year":2020,"hippo__metadata__dateCreated__hour":13,"hippo__metadata__dateCreated__minute":5,"hippo__metadata__dateCreated__second":0,"hippo__metadata__dateCreated__millisecond":0,"hippo__metadata__dateCreated__dayUTC":28,"hippo__metadata__dateCreated__monthUTC":5,"hippo__metadata__dateCreated__yearUTC":2020,"hippo__metadata__dateCreated__hourUTC":13,"hippo__metadata__dateCreated__minuteUTC":5,"hippo__metadata__dateCreated__secondUTC":0,"hippo__metadata__dateCreated__millisecondUTC":0,"hippo__metadata__dateModified__type":"DateTime","hippo__metadata__dateModified__ts":1590671479000,"hippo__metadata__dateModified__day":28,"hippo__metadata__dateModified__month":5,"hippo__metadata__dateModified__year":2020,"hippo__metadata__dateModified__hour":13,"hippo__metadata__dateModified__minute":11,"hippo__metadata__dateModified__second":19,"hippo__metadata__dateModified__millisecond":0,"hippo__metadata__dateModified__dayUTC":28,"hippo__metadata__dateModified__monthUTC":5,"hippo__metadata__dateModified__yearUTC":2020,"hippo__metadata__dateModified__hourUTC":13,"hippo__metadata__dateModified__minuteUTC":11,"hippo__metadata__dateModified__secondUTC":19,"hippo__metadata__dateModified__millisecondUTC":0,"stripped":{"id":"bloodm1","type":"BloodMeter","hippo":{"type":"Number","value":40,"metadata":{"dateCreated":{"type":"DateTime","value":"2020-05-28T13:05:00.00Z"},"dateModified":{"type":"DateTime","value":"2020-05-28T13:11:19.00Z"}}}}}
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>ok, we got forward, (did not understand to use fiware-service header when posting the rule, our bad). BUT the email sending is not working. we get this error:</p>
  
  <pre><code>time=2020-06-08T12:01:05.234Z | lvl=DEBUG | corr=ba89f43e-a97f-11ea-9b7c-167c661b292c; perseocep=2 | trans=3ec8910b-ef8b-461e-bf71-dbf10f9ecf85 | op=/actions/do | path=/actions/do | comp=perseo-fe | srv=perseo | subsrv=/ | msg=emailAction.SendMail {"from":"mail@profirator.fi","to":"ilari.mikkonen@profirator.fi","subject":"Perseo Test One","headers":{}} {"code":"EENVELOPE","response":"554 5.7.1 &lt;unknown[212.15.209.181]&gt;: Client host rejected: Access denied","responseCode":554} undefined
  time=2020-06-08T12:01:05.237Z | lvl=ERROR | corr=ba89f43e-a97f-11ea-9b7c-167c661b292c; perseocep=2 | trans=3ec8910b-ef8b-461e-bf71-dbf10f9ecf85 | op=/actions/do | path=/actions/do | comp=perseo-fe | srv=perseo | subsrv=/ | msg=emailAction.SendMail {"to":"ilari.mikkonen@profirator.fi","from":"mail@profirator.fi","subject":"Perseo Test One"} Can't send mail - all recipients were rejected: 554 5.7.1 &lt;unknown[212.15.209.181]&gt;: Client host rejected: Access denied
  </code></pre>
  
  <p>email creds are tested and working on other components. Tested with 2 different email services. We give these values via docker env variables:</p>
  
  <pre><code>PERSEO_SMTP_HOST: email.service.host
  PERSEO_SMTP_PORT: 587
  PERSEO_SMTP_SECURE: "false"
  PERSEO_SMTP_AUTH_USER: user@email.com
  PERSEO_SMTP_AUTH_PASS: password
  </code></pre>
  
  <p>We also tired to PERSEO_SMTP_TLS_REJECTUNAUTHORIZED: with <code>false</code></p>