hanami / mailer

Mail for Ruby applications

Home Page:http://hanamirb.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lotus::Mailer::MissingDeliveryDataError overwriting Mail::ArgumentError

mrbongiolo opened this issue · comments

The default messages that come from Mail::ArgumentError are being overwritten by the error class from Lotus::Mailer, I had a little typo on my :smtp config hash. But all that Lotus said was to check from or or, but those were ok. Probably those params will be the ones missing the most, but having access to the complete, and more descritive, error message from Mail is good. I had to overwrite Lotus::Mailer#deliver to debug the original error message just too see that my :authentication value was wrong.

@mrbongiolo would you be able to work on a PR to buble the message from Mail to the top?

@joneslee85 I think so, will see if I can do it today or tomorrow.

Just sent a quick PR, I just append the original message to the usual message used by the DeliveryError, since most of the times it will be just a missing from or to params that causes an error.