Thanks for your cooperation, I figured it out
Turns out that when there are not enough topics to send a digest we pass a āNullMailā object to the āEmailSenderā class. It didnāt help that the API changed in rails 4.2.0ā¦
https://github.com/discourse/discourse/commit/52a66826907bebe81b13ea6bd417f13a05443507