The email_to_user() function is supposed to work with "fake" (not belonging to DB) $user objects . This way, it's enough to have:
and mail will be sent to that address, no matter of the rest of the missing bits in the $user object.
But right now, two notices about undefined $user->id are present. One in the set_send_count() function and another in the over_bounce_threshold() function.
Going to check for $user->id existence in both functions to prevent those notices.