Repeat email v1

Also adds some badly needed testing infrastructure.
It seems a little odd but I agree.