Moved email scheduling to hook