thoughtbot/griddler — pull request #185 by matthewbarram (2014-11-23 01:46:15+00:00)
Title: Allow hashes to be submitted as headers

Hi!

Thanks for this awesome gem! I am finding it super useful. :-) I am pretty new to this whole thing, so please let me know if I have missed something or there is a much better way of doing this.

Goal
-------
Allow hashes to be sent as headers from the adapter gems.

Side Note
-------
I looked at the Mandrill, Sendgrid, PostMark gems and as far as I can see none of them submit header params.

Current Situation
-------
If a hash is submitted when it is processed by the Mail::Header class it will throw an exception. My logic is that if the headers are already formatted hashes, then they do not need to be processed by Mail::Header.

Tests
-------
I have added a test to confirm that hashes are dealt with correctly.

I look forward to your feedback.

Cheers
Matthew