Skip to content

Instantly share code, notes, and snippets.

@prsanjay
Created April 12, 2019 05:01
Show Gist options
  • Save prsanjay/a272a601c29bc54ab3b7f5a0b8739a2c to your computer and use it in GitHub Desktop.
Save prsanjay/a272a601c29bc54ab3b7f5a0b8739a2c 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