Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransportListener via Session #216

Closed
koen-serry opened this issue Jul 17, 2019 · 9 comments
Closed

TransportListener via Session #216

koen-serry opened this issue Jul 17, 2019 · 9 comments
Assignees
Labels

Comments

@koen-serry
Copy link

I was wondering if there's any workaround for adding a TransportListener to the Transport via the session? Since I'd like to have both positive and negative feedback from the underlying smtp server.

@bbottema
Copy link
Owner

Uhh, I was not aware of this TransportListener. Can you link some additional documentation for me?

More to the point, what feedback are you missing? The library let's you know when it failed or succeeded right (exception or no exception).

@bbottema
Copy link
Owner

bbottema commented Aug 6, 2019

Any update @koen-serry?

@koen-serry
Copy link
Author

@bbottema
Copy link
Owner

bbottema commented Aug 8, 2019

Yeah I had found that by now ;)

My other question remains unanswered which really is about why you would need access to the underlying JavaMail API; doesn't Simple Java Mail provide enough feedback? What did you expect and what are you missing.

@koen-serry
Copy link
Author

Well the event allows you to get access to all the details of the session that is shielded by the api as it is now. Certainly if things don't work as they should it is helpful to be able to have access to all the underlying objects

@bbottema
Copy link
Owner

Would you like to configure this at email level or at mailer level?

@koen-serry
Copy link
Author

I think it would make sense on a mailer level since you're generally either concerned about your smtp server or not at all.

@bbottema bbottema added this to the 6.0.1 milestone Sep 27, 2019
@bbottema
Copy link
Owner

bbottema commented Oct 27, 2019

Ok, so I'm close to picking this up. There is one issue though, in 6.0.0, support for server clustering was added. So you can have several mailer instances all adding to a cluster, resulting in the effect that any mailer used to send an email delegates to the cluster instead (meaning, mailer1.sendEmail(email) doesn't guarantee server1 is used to send the email).

How then to manage server feedback using transport listeners?

I guess I should have transport listeners on each session and aggregate it into a single new transport listener or something like that...


On the other hand, please take a look at #148 and see if that suits your needs instead.

@bbottema bbottema removed this from the 6.0.1 milestone Nov 12, 2019
@bbottema
Copy link
Owner

bbottema commented Dec 9, 2019

Closing as it is not clear to me what problem it solves that cannot be solved with the current facilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants