Well, that's bad. The `Transport` instance is never closed. `JavaMailSenderImpl#connectTransport` looks like a good fit for what you're doing (relying on the plain `connect` does not seem such a great idea either). Unfortunately it's protected but not rocket science either.  I guess you need a `Transport#close()` class in a guarded finally block code. 