more flexible support for python 2.6 in smtp handler (with no secure arg)