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

Implement Mutiny support for the mailer service #7211

Merged
merged 2 commits into from Feb 17, 2020

Conversation

cescoffier
Copy link
Member

  • Implement the Mutiny API
  • Deprecated the previous API
  • Update tests and documentation

These changes are backward compatible.

I've also updated:

  • the mock mailer to print <empty> instead of null
  • fix a few logged messages

The template support still returns a CompletionStage. It will be covered once #7101 is merged. This would be a breaking change.

@cescoffier cescoffier added this to the 1.3.0 milestone Feb 15, 2020
* @return an {@link Uni} indicating when the mails have been sent. The {@link Uni} may fire a failure if the
* emails cannot be sent.
*/
Uni<Void> send(Mail... mails);
Copy link
Contributor

@gastaldi gastaldi Feb 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the returned object may give more info instead of Void? MailResult perhaps?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what would it contains? Basically it just tells you success or failure which is conveyed using the Uni events.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about the message itself but maybe Uni already handles that

@cescoffier cescoffier mentioned this pull request Feb 16, 2020
16 tasks
@cescoffier
Copy link
Member Author

Force pushed to fix the import ordering issue.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just had one small Javadoc comment. Otherwise looks good.

Feel free to fix and merge or ignore and merge :).

@gsmet gsmet modified the milestones: 1.3.0.Alpha2, 1.3.0 Feb 17, 2020
@gsmet
Copy link
Member

gsmet commented Feb 17, 2020

I fixed the small typo and rebased. Let's wait for CI.

@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 17, 2020
@gsmet gsmet merged commit b9f44b6 into quarkusio:master Feb 17, 2020
@cescoffier cescoffier deleted the features/mutiny-mailer branch February 26, 2020 08:19
@Akejelu-Nelu
Copy link

I have difficulty in getting the response code for each email i sent with reactive mailer.

return reactiveMailer.send(mail)
.subscribeAsCompletionStage()
.thenApply(response -> Response.accepted().build())
.exceptionally(throwable -> Response.serverError().build());

this is what my return statement looks like after building the mail. The mail object also has a list of recipients. I'm not sure how i can get the response code / status of that email if it was sent or not. Any suggestion is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants