moved email stuff to a different package to avoid cirular deps