Skip to content

Instantly share code, notes, and snippets.

@sanjay-btc
Created April 10, 2019 11:42
Show Gist options
  • Save sanjay-btc/dd29cee390605e519299e27869299bfb to your computer and use it in GitHub Desktop.
Save sanjay-btc/dd29cee390605e519299e27869299bfb to your computer and use it in GitHub Desktop.
class ApplicationMailbox < ActionMailbox::Base
# Any of the recipients of the mail (whether to, cc, bcc) are matched against the regexp.
routing /^replies@/i => :replies
# Any of the recipients of the mail (whether to, cc, bcc) needs to be an exact match for the string.
routing "help@example.com" => :help
# Any inbound_email that has not been already matched will be sent to the BackstopMailbox.
routing :all => :backstop
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment