Implement timeout and the timeout exception on STMP connection attempts

I needed this today, so I'd thought I'd contribute back.  This implements timeout and the timeout exception on STMP connection attempts.