Saving the information emailed and processed via Mailgun into my app

假装没事ソ 提交于 2019-12-04 15:00:28

The mailgunner here:

We do not post Rails objects, we post simple HTTP parameters as explained in this table: http://documentation.mailgun.net/user_manual.html#parsed-messages-parameters

There is no "message" parameter which you're trying to grab with params[:message], you should assemble your message with individual components like parmas[:Subject], params[:body-plain], etc.

Also, since the POST is coming from a different domain, you need to disable Rails request forgery protection for this controller action: http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection/ClassMethods.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!