Repeat email v1

Also adds some badly needed testing infrastructure.
This is a really neat way of doing it that allows the developer to either pass in a key or value, nice work!