stephenb/sendgrid — pull request #14 by Fire-Dragon-DoL (2013-06-08 03:55:06+00:00)
Title: Fixed the problem where #mail module method was not fired

Because the instance method ActionMailer::Base#mail takes precedence over SendGrid::ClassMethods#mail method, the module method was never run.

To fix this, I override #mail in the class_eval when module is included, moving the mail method from ClassMethods directly in here and adding at the end #send_grid_old_mail method call, which is just an alias for ActionMailer::Base#mail method.