Digest emails rendered when mail is disabled

Maybe not a bug, but I’m looking at the logs trying to diagnose a mail problem on a site where mail is disabled except for admins and logs show that Digest emails are being rendered for all users.

Seems like we might want to check that a bit sooner, but I guess it doesn’t much matter.

Sorry, what does this mean? I can make no sense of this text…? “digest emails are being rendered”

It means that emails are staff-only and

 Rendering user_notifications/digest.html.erb

appeared 109429 times in yesterday’s log. So it appears to me that all of those digests got rendered, just to be dumped on the floor and not mailed out. If it weren’t a staging site where it doesn’t matter, it might be the case that those digests would be counted as having been sent when, in fact, they weren’t, but I haven’t looked at the code to see whether that’s true.

3 Likes

Hmm, didn’t we fix something related to this @falco for another big client, e.g. skipping unnecessary email work a bit earlier in our code paths?

Are you on absolute latest @pfaffman?

Pretty close: v2.2.0.beta5 +111

Yes, @eviltrout created a patch for this, but it only affects when emails are disabled.

Only admin email isn’t a very popular pick, mostly used for staging sites and debugging.

Is this causing any real problems @pfaffman ?

4 Likes

I think it’s safe to extend this “don’t do digest work” for the other setting “only admin emails” too @falco … I assume this is an easy one-liner kind of change?

Not really. It just seemed odd,so I thought I’d see if anyone else thought it was a real problem. It’s a staging site, so it doesn’t matter at all for this instance.