title: Email Notifications with Stream Analytics
body: <p>I'm looking for an elegant way to send an email notification in case a Stream Analytics job detects that a threshold was passed - roughly the same as shown on Channel 9 by Santosh Balasubramanian.</p>
  
  <p>Upon passing the threshold, a record is written to a SQL table. This should trigger an email to be sent.</p>
  
  <p>For a second, I thought I could a Mobile Services 'insert' script defined on that table <a href="https://azure.microsoft.com/en-us/documentation/articles/store-sendgrid-mobile-services-send-email-scripts/#add-script" rel="nofollow">as explained here</a>, but of course, the Stream Analytics job doesn't pass through the Mobile Services API...</p>
  
  <p>Best option I could think of so far is using a <a href="https://azure.microsoft.com/en-us/documentation/articles/mobile-services-schedule-recurring-tasks/" rel="nofollow">Mobile Services Scheduled Job</a> instead, which would poll the table every 5 minutes or so, and send an email if new records are found.</p>
  
  <p>Is there a better way? Or should I add a feature request for Stream Analytics to enable Mobile Services as output type?</p>