Skip to content

Commit 73d290b

Browse files
committed
Log when empty emails are rejected
1 parent 05df5be commit 73d290b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

r2/r2/lib/emailer.py

+2
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ def sendmail(email):
190190
leave = False).render(style = "email")
191191
# handle unknown types here
192192
elif not email.body:
193+
print ("Rejecting email with an empty body from %r and to %r"
194+
% (email.fr_addr, email.to_addr))
193195
email.set_sent(rejected = True)
194196
continue
195197
sendmail(email)

0 commit comments

Comments
 (0)