Fix problem where connections limit would be exceeded

Also there are probelsm emails not being expunged by library correctly. We must ensure that we aren't looking at an expunged email before we try to read the information from it.