added optional support for smtp