rewrite of e-mail system