title: Riemann email assert failed?
body: <p>I am using riemann output plugin in logstash and I want to alert using riemann when the user field is root.</p>
  
  <p>Logstash-config:</p>
  
  <pre><code>if "server2-cronlog" in [tags]{
          riemann {
              riemann_event =&gt;  [
                          "service", "My Awesome Logs",
                          "username", "%{user}",
                          "description", "%{command}"
                        ]
            }
      }
  </code></pre>
  
  <p>Riemann-config: I add the following lines to the end of riemann config file contents (as were when riemann was installed)</p>
  
  <pre><code>(def email(mailer {    :host "xyz"
              :port 25
              :user "abc@gmail.com"
              :from "abc@gmail.com"
  }))
  
  (def tell-ops(rollup 3 3600 (email "cde@gmail.com")))
  
  (streams
  (where (username "root") tell-ops)
  )
  
  ; print events to the log
  (streams
          prn)
  </code></pre>
  
  <p>Note: Our smtp server does not require password, thus it's not written in config.</p>
  
  <p>I see from my logstash console a riemann event is generated.</p>
  
  <p>In my riemann server console, I get the following warning:</p>
  
  <pre><code>WARN [2014-06-25 16:18:23,007] pool-1-thread-8 - riemann.streams - riemann.email$mailer$make_stream__17457$stream__17458@782bbb7b threw
  java.lang.AssertionError: Assert failed: (or (and (nil? user) (nil? pass)) (and user pass))
      at postal.smtp$smtp_send_STAR_.invoke(smtp.clj:31)
      at postal.smtp$smtp_send.doInvoke(smtp.clj:58)
      at clojure.lang.RestFn.invoke(RestFn.java:423)
      at postal.core$send_message.invoke(core.clj:35)
      at riemann.email$email_event.invoke(email.clj:18)
      at riemann.email$mailer$make_stream__17457$stream__17458.invoke(email.clj:69)
      at riemann.streams$rollup$side_effects__10105$fn__10111.invoke(streams.clj:1040)
      at riemann.streams$rollup$side_effects__10105.invoke(streams.clj:1040)
      at riemann.streams$part_time_simple$stream__9560.invoke(streams.clj:611)
      at riemann.config$eval43$stream__44$fn__49.invoke(riemann.config:39)
      at riemann.config$eval43$stream__44.invoke(riemann.config:39)
      at riemann.core$stream_BANG_$fn__11096.invoke(core.clj:19)
      at riemann.core$stream_BANG_.invoke(core.clj:18)
      at riemann.transport$handle.invoke(transport.clj:116)
      at riemann.transport.tcp$tcp_handler.invoke(tcp.clj:84)
      at riemann.transport.tcp$gen_tcp_handler$fn__11316.invoke(tcp.clj:65)
      at riemann.transport.tcp.proxy$org.jboss.netty.channel.SimpleChannelHandler$ff19274a.messageReceived(Unknown Source)
      at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88)
      at riemann.transport.tcp.proxy$org.jboss.netty.channel.SimpleChannelHandler$ff19274a.handleUpstream(Unknown Source)
      at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
      at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
      at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
      at riemann.transport.proxy$org.jboss.netty.handler.codec.oneone.OneToOneDecoder$ff19274a.handleUpstream(Unknown Source)
      at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
      at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
      at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
      at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
      at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
      at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
      at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
      at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p>So console is: the above warning, then three events description with state, description, then same warning and end nullpointer exception.</p>
  
  <p>The email is not being sent to the user. What is wrong??</p>