Question

In my email-send-app, I holding a Singleton Session instance in SenderImpl. For per email message i retrieve Transport instance from session for sending, and close it after sending is complete.

Now i want reuse SMTP Connection for batch emails sending, so i want figure out, what is the relation between Session, Transport and underlying Socket Connection(SMTP Connection)?

A Transport instance Corresponds to a single underlying Socket Connection, is that correct?

No correlation between Session and underlying Socket Connection, is that right?

All response will be greatly appreciated.

Was it helpful?

Solution

A Transport corresponds to a single connection.

A Session holds configuration information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top