manual merge of "old" patch by someone to replace gmail support by smtp (untested)