-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Create a sendAsync method #13
Comments
Maybe we could implement a reactive mail client? 😉 |
or just name the method |
@jroper could you explain what you have in mind ? Provide an implementation of http://www.reactive-streams.org/ ? Rely on Akka for async ? Replace commons-mailer with X ? Thanks :) |
Definitely not provide an implementation of reactive streams. However, we could use Akka streams to implement an asynchronous SMTP client - SMTP is mostly line by line so would be quite simple to parse and implement. But, I was 90% joking - I don't want to maintain an SMTP client. |
I was 90% sure you were joking 😄 |
You could also just do: Future(...) That will dispatch it asynchronously, and also allow you to add callbacks when it's done. |
@jroper even if it sounds aweful but I think maintaining a akka-mail client has benefits. Also we wouldn't need to provide a SMTP Mailer, we could drop apache-commons Mail and just use javax.mail (which apache-commons uses internally) we would just drop a dependency that only gives a "nicer" API. But that happens only internally so, the benefit is definitely there by dropping yet another dependency. And Akka is mostly there anyway. |
When I send an email I don't want to "block" my process. I'm using Akka to "schedule" the send:
Maybe we can add a
sendAsync
to the API to do that ? or just an example in the documentation ?And it might be better to return a
Future
?The text was updated successfully, but these errors were encountered: