def _transform_ssl_error(strerror):
 if (strerror is None):
  return 'Unknown connection error'
 elif strerror.endswith('certificate verify failed'):
  return 'SMTP server SSL certificate verify failed'
 else:
  return strerror

def _transform_ssl_error ( strerror ) : if ( strerror is None ) : return 'Unknown connection error' elif strerror . endswith ( 'certificate verify failed' ) : return 'SMTP server SSL certificate verify failed' else : return strerror
clean up errors like: _ssl .