Corrected email scheduler