Restructuring for smtp tests.