Hey Brad --
Thanks for the gem. I noticed you pulled out headers support because of a bug surfaced in #3.
I needed headers for a project I'm working on (we rely on headers to detect spam and vacation auto-replies), so I went ahead and fixed the underlying issue here:
akalra@56bf972
It's an interim fix at best, and though it works just fine for our emails on Mailgun, I didn't really put it through the wringer or anything yet. Let me know if you'd like me to submit a pull request.
IMHO, the right fix is to get Griddler to optionally accept fully-parsed headers instead of raw headers (since we already get those from Mailgun, and faking 'raw headers' seems silly). The challenge with that approach is two-fold. Firstly, Griddler doesn't do any parsing (it leans on ActionMailer for that) and the parsed version it returns is a Mail::Header not a plain HashWithIndifferentAccess. Also, Griddler returns both raw and parsed headers to the user -- if it wanted to continue doing that (even if we only gave it fully-parsed headers) it would then be doing the silly faking of 'raw headers'.
So it's possible that this is the least-evil of all fixes, but probably worth a conversation with Griddler?
Thanks!
Ankur
Hey Brad --
Thanks for the gem. I noticed you pulled out headers support because of a bug surfaced in #3.
I needed headers for a project I'm working on (we rely on headers to detect spam and vacation auto-replies), so I went ahead and fixed the underlying issue here:
akalra@56bf972
It's an interim fix at best, and though it works just fine for our emails on Mailgun, I didn't really put it through the wringer or anything yet. Let me know if you'd like me to submit a pull request.
IMHO, the right fix is to get Griddler to optionally accept fully-parsed headers instead of raw headers (since we already get those from Mailgun, and faking 'raw headers' seems silly). The challenge with that approach is two-fold. Firstly, Griddler doesn't do any parsing (it leans on ActionMailer for that) and the parsed version it returns is a Mail::Header not a plain HashWithIndifferentAccess. Also, Griddler returns both raw and parsed headers to the user -- if it wanted to continue doing that (even if we only gave it fully-parsed headers) it would then be doing the silly faking of 'raw headers'.
So it's possible that this is the least-evil of all fixes, but probably worth a conversation with Griddler?
Thanks!
Ankur