added email testing, fixed issue #2