ruby on rails - How to identify mandrill webhook -


i have rails 4 application sends emails using mandrill. trying detect weather mail opened or bounced, using webhooks this. receive webhooks, can't tell of them identify particular email database.

i've tried using this

  def send_message(email)      mail( from: ...,           to: ...,           subject: ...)      headers["x-mc-autohtml"] = "true"     headers["x-mc-track"] = "opens"     headers['x-mc-mergevars'] = { "id" => some_id }.to_json   end 

but i'm not sure if i'm supposed receive x-mc-mergevars ( i've understand docs)

unfortunately, it's not working.

do have ideas or alternative solution? thanks

i've figured out myself.

this line needs there

headers['x-mc-metadata'] = { "user_id" => user.id}.to_json 

here further details: http://help.mandrill.com/entries/21786413-using-custom-message-metadata

hope helps since cost me several hours.


Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -