change semantics of before_send hook