diff --git a/lib/gitlab/email/handler.rb b/lib/gitlab/email/handler.rb
index 56d848cdd7b0a2c332d9eb8177a3fabf1e11916c..b9221f1210c1e41481741c9932e0306c40f5c7be 100644
--- a/lib/gitlab/email/handler.rb
+++ b/lib/gitlab/email/handler.rb
@@ -1,54 +1,15 @@
 
+require 'gitlab/email/handler/create_note_handler'
+require 'gitlab/email/handler/create_issue_handler'
+
 module Gitlab
   module Email
-    class Handler
-      attr_reader :mail, :mail_key
-
-      def initialize(mail, mail_key)
-        @mail = mail
-        @mail_key = mail_key
-      end
-
-      def message
-        @message ||= process_message
-      end
-
-      def author
-        raise NotImplementedError
-      end
-
-      def project
-        raise NotImplementedError
-      end
-
-      private
-      def validate_permission!(permission)
-        raise UserNotFoundError unless author
-        raise UserBlockedError if author.blocked?
-        raise ProjectNotFound unless author.can?(:read_project, project)
-        raise UserNotAuthorizedError unless author.can?(permission, project)
-      end
-
-      def process_message
-        add_attachments(ReplyParser.new(mail).execute.strip)
-      end
-
-      def add_attachments(reply)
-        attachments = Email::AttachmentUploader.new(mail).execute(project)
-
-        reply + attachments.map do |link|
-          "\n\n#{link[:markdown]}"
-        end.join
-      end
-
-      def verify_record(record, exception, error_title)
-        return if record.persisted?
-
-        msg = error_title + record.errors.full_messages.map do |error|
-          "\n\n- #{error}"
-        end.join
-
-        raise exception, msg
+    module Handler
+      def self.for(mail, mail_key)
+        [CreateNoteHandler, CreateIssueHandler].find do |klass|
+          handler = klass.new(mail, mail_key)
+          break handler if handler.can_handle?
+        end
       end
     end
   end
diff --git a/lib/gitlab/email/handler/base_handler.rb b/lib/gitlab/email/handler/base_handler.rb
new file mode 100644
index 0000000000000000000000000000000000000000..230d13feea982f87845b213d9caa01d6ce3ab4dc
--- /dev/null
+++ b/lib/gitlab/email/handler/base_handler.rb
@@ -0,0 +1,57 @@
+
+module Gitlab
+  module Email
+    module Handler
+      class BaseHandler
+        attr_reader :mail, :mail_key
+
+        def initialize(mail, mail_key)
+          @mail = mail
+          @mail_key = mail_key
+        end
+
+        def message
+          @message ||= process_message
+        end
+
+        def author
+          raise NotImplementedError
+        end
+
+        def project
+          raise NotImplementedError
+        end
+
+        private
+        def validate_permission!(permission)
+          raise UserNotFoundError unless author
+          raise UserBlockedError if author.blocked?
+          raise ProjectNotFound unless author.can?(:read_project, project)
+          raise UserNotAuthorizedError unless author.can?(permission, project)
+        end
+
+        def process_message
+          add_attachments(ReplyParser.new(mail).execute.strip)
+        end
+
+        def add_attachments(reply)
+          attachments = Email::AttachmentUploader.new(mail).execute(project)
+
+          reply + attachments.map do |link|
+            "\n\n#{link[:markdown]}"
+          end.join
+        end
+
+        def verify_record(record, exception, error_title)
+          return if record.persisted?
+
+          msg = error_title + record.errors.full_messages.map do |error|
+            "\n\n- #{error}"
+          end.join
+
+          raise exception, msg
+        end
+      end
+    end
+  end
+end
diff --git a/lib/gitlab/email/handler/create_issue.rb b/lib/gitlab/email/handler/create_issue_handler.rb
similarity index 89%
rename from lib/gitlab/email/handler/create_issue.rb
rename to lib/gitlab/email/handler/create_issue_handler.rb
index 72d49ec6c96a3dc3d4c3bbd698325f5c3aa496c0..259d74a83bf095253828dfe74a26ddae68f30426 100644
--- a/lib/gitlab/email/handler/create_issue.rb
+++ b/lib/gitlab/email/handler/create_issue_handler.rb
@@ -1,10 +1,10 @@
 
-require 'gitlab/email/handler'
+require 'gitlab/email/handler/base_handler'
 
 module Gitlab
   module Email
-    class Handler
-      class CreateIssue < Handler
+    module Handler
+      class CreateIssueHandler < BaseHandler
         def can_handle?
           !!project
         end
diff --git a/lib/gitlab/email/handler/create_note.rb b/lib/gitlab/email/handler/create_note_handler.rb
similarity index 92%
rename from lib/gitlab/email/handler/create_note.rb
rename to lib/gitlab/email/handler/create_note_handler.rb
index 32deb5a311ec5b7d457d2577c212afe6130f1b8c..7252906fd48b6c8e6ff9e2187ab7aa4882b4cdc1 100644
--- a/lib/gitlab/email/handler/create_note.rb
+++ b/lib/gitlab/email/handler/create_note_handler.rb
@@ -1,10 +1,10 @@
 
-require 'gitlab/email/handler'
+require 'gitlab/email/handler/base_handler'
 
 module Gitlab
   module Email
-    class Handler
-      class CreateNote < Handler
+    module Handler
+      class CreateNoteHandler < BaseHandler
         def can_handle?
           !!sent_notification
         end
diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb
index da4299ebcb3e6d7b089184fb991f34a4c5a8dfe7..7038346192b8fe9d6f061aaf77b723b84f903a02 100644
--- a/lib/gitlab/email/receiver.rb
+++ b/lib/gitlab/email/receiver.rb
@@ -1,6 +1,5 @@
 
-require 'gitlab/email/handler/create_note'
-require 'gitlab/email/handler/create_issue'
+require 'gitlab/email/handler'
 
 # Inspired in great part by Discourse's Email::Receiver
 module Gitlab
@@ -31,7 +30,7 @@ module Gitlab
 
         raise SentNotificationNotFoundError unless mail_key
 
-        if handler = find_handler(mail, mail_key)
+        if handler = Handler.for(mail, mail_key)
           handler.execute
         elsif mail_key =~ %r{/|\+}
           # Sent Notification mail_key would not have / or +
@@ -65,13 +64,6 @@ module Gitlab
           break key if key
         end
       end
-
-      def find_handler(mail, mail_key)
-        [Handler::CreateNote, Handler::CreateIssue].find do |klass|
-          handler = klass.new(mail, mail_key)
-          break handler if handler.can_handle?
-        end
-      end
     end
   end
 end