This is a combination of 2 commits.

Adding tests for smtp. Tests hit real smtp server at the moment