Erregistroa posta elektronikoz bidali: Sensory adaptation as optimal resource allocation