hope you guys can help me :)
I have an heroku app and have Mailgun integrated. I have already set up Mailgun, and my heroku repo is updated.
When I receive an mail through Mailgun, it should take all email sent and post it straight to my app, where it will hit the /incoming url and land on any action associated with it.
Problem is, that whenever I send an email to my mailgun smtp login; the mail is sent but this error appears on my logs:
Will retry in 600 seconds: klaha.77@gmail.com → http://jm-blocmarks.herokuapp.com/incoming 'test 3' Moved Permanently Server response: 301 Moved Permanently
These are my mailgun settings:
Mailgun Routes
Filter: catch_all()
forward("http://jm-blocmarks.herokuapp.com/incoming")
config/routes.rb
post :incoming, to: 'incoming#create'
controllers/incoming_controller.rb
class IncomingController < ApplicationController
# http://stackoverflow.com/questions/1177863/how-do-i-ignore-the-authenticity-token-for-specific-actions-in-rails
skip_before_action :verify_authenticity_token, only: [:create]
def create
# Take a look at these in your server logs
# to get a sense of what you're dealing with.
puts "INCOMING PARAMS HERE: #{params}"
# You put the message-splitting and business
# magic here.
# Assuming all went well.
head 200
end
end
What am I doing wrong?
Thanks a lot!