smtp: Moved parsing of url path into separate function