5

I'm trying to send an email from my Kynetx extension. As a test run, I set up this rule:

 rule first_rule {
    select when pageview ".*"    
    email:forward() with
    to = "me@example.com" and
    message = "Testing Kynetx Mail" and
    htmlmessage = "<html><body><p>Jed has html</p></body></html>";
    notify("Testing", "email sent");
  }

The notification shows up, but I never see the email, not even in my spam filter. Maybe email:forward() can only be used within the context of

select when mail received

?

As an alternative I guess I can use one of the PostMark-like services or maybe SNS ( http://wiki.kynetx.com/pages/Kynetx_Network_Services_(KNS)_API#SNS_Endpoint ). I just thought it'd be nice to keep it all in Kynetx.

Jed
  • 703
  • 6
  • 13

2 Answers2

4

You can only use the email:forward() action when responding to an event signaled from within the email endpoint, as you guessed.

The best way to do this is with a postmark or sendgrid like service.

We have considered enabling this, but the pains that must be taken to prevent Kynetx from being used as a spam platform have made it a more difficult thing to develop.

If you do use another service, consider creating a module for the service that you can share with others. :)

TelegramSam
  • 2,770
  • 1
  • 17
  • 22
2

I wrote a KRL module for Postmark that you can use if you have an account with them. See my post here about how to use it:

http://globalconstant.scnay.com/2011/04/04/kynetx-module-for-postmark/

It's not quite finished yet--I still have some parts of their API I need to build in. But it's a start.

Steve Nay
  • 2,819
  • 1
  • 30
  • 41
  • Cheers Steve- I'll check it out! – Jed Apr 04 '11 at 22:06
  • Steve, I've incorporated this into my latest little Kynetx app, [TimeZucker](http://www.timezucker.com). So far it seems to be working great. FYI it throws this error at me, but messages are being delivered. Thanks again for the quick work! `Exception: postmark_headers is not defined` – Jed Apr 05 '11 at 22:54
  • Thanks for the heads up. I'll take a look at it. Ping me on Twitter (@snay2) if you encounter anything else. – Steve Nay Apr 05 '11 at 22:58