diff --git a/pom.xml b/pom.xml
index f15c87c..7eafd45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,6 +72,10 @@
io.quarkus
quarkus-resteasy-mutiny
+
+ io.quarkus
+ quarkus-resteasy-qute
+
io.quarkus
quarkus-junit5
diff --git a/src/main/java/com/covas/Resources/MailRessource.java b/src/main/java/com/covas/Resources/MailRessource.java
index b87aee6..cc979dc 100644
--- a/src/main/java/com/covas/Resources/MailRessource.java
+++ b/src/main/java/com/covas/Resources/MailRessource.java
@@ -9,7 +9,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
import io.quarkus.mailer.Mail;
-import io.quarkus.mailer.Mailer;
+import io.quarkus.mailer.MailTemplate;
import io.quarkus.mailer.reactive.ReactiveMailer;
@@ -19,12 +19,17 @@ public class MailRessource {
@Inject
private ReactiveMailer mail;
+ @Inject
+ private MailTemplate hello;
+
@GET
+ @Path("async")
public CompletionStage sendMail(){
- return mail.send(Mail.withText("valcze80@gmail.com", "async", "toto"))
- .subscribeAsCompletionStage()
- .thenApply(x -> Response.accepted().build());
+ //return mail.send(Mail.withText("valcze80@gmail.com", "async", "toto"))
+ //.subscribeAsCompletionStage()
+ //.thenApply(x -> Response.accepted().build());
+ return hello.to("valcze80@gmail.com").subject("test").data("name", "Robert").send().subscribeAsCompletionStage().thenApply(x -> Response.accepted().build());
}
diff --git a/src/main/resources/templates/hello.txt b/src/main/resources/templates/hello.txt
new file mode 100644
index 0000000..9a61208
--- /dev/null
+++ b/src/main/resources/templates/hello.txt
@@ -0,0 +1 @@
+Coucou {name} !
\ No newline at end of file