module Mail

def self.eager_autoload!

Mail.eager_autoload!
require 'mail'

Usage:

Useful when running mail in a threaded process.
This runs through the autoload list and explictly requires them for you.
def self.eager_autoload!
  @@autoloads.each { |_,path| require(path) }
end