fire up smtpclient only when sending and fix tests