Gravar-mail: Time-optimal control strategies in SIR epidemic models