I was wondering if anyone can explain why Mandrill would be sending null for sender field of a message when parsing incomming messages. For example while testing Mandrill incoming via Pry this is what I came up with:
begin
mandrill = JSON.parse(params["mandrill_events"])).map(&:deep_symbolize_keys!)
binding.pry
# [25] pry(#<SubscriberController>)> mandrill.first[:msg][:text] => "Test\n"
# [26] pry(#<SubscriberController>)> mandrill.first[:msg][:sender] => nil
# [27] pry(#<SubscriberController>)> mandrill.first["msg"]["headers"]["From"].match(/<(.+)>\Z/)[1] => "
m...@domain.com"
rescue
render :json => { status: "Fuck this, I'm out." }, status: 503
end
end
As you can see from line 26 of the session, you guys don't send me a sender so I have to parse it myself, is there any reason why you do not send a proper sender?