Fixed #19134 -- Allowed closing smtp backend when the server is stopped

Thanks Sebastian Noack for the report and the initial patch.
Fixed #19382 -- Stopped smtp backend raising exception when already closed

Thanks Sebastian Noack for the report and the initial patch.