Wrong variable logged in email notification