From 382b1052d46418071d23f25f8272a68a4f4af265 Mon Sep 17 00:00:00 2001 From: Hedi MJID Date: Tue, 1 Feb 2022 09:17:11 +0100 Subject: [PATCH] commentaires --- src/main/java/fr/organizee/controller/MailController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/fr/organizee/controller/MailController.java b/src/main/java/fr/organizee/controller/MailController.java index c78984d..3543668 100644 --- a/src/main/java/fr/organizee/controller/MailController.java +++ b/src/main/java/fr/organizee/controller/MailController.java @@ -20,18 +20,21 @@ public class MailController { this.service = service; } + // Envoi de mail en text brut @PostMapping("/text") public ResponseEntity sendMail(@RequestBody Mail mail) { service.sendMail(mail); return new ResponseEntity<>("Email Sent successfully", HttpStatus.OK); } + // Envoi de mail au format HTML @PostMapping("/html") public ResponseEntity sendMailHTML(@RequestBody Mail mail) throws MessagingException { service.sendMailHTML(mail); return new ResponseEntity<>("HTML mail sent successfully", HttpStatus.OK); } + // Envoi du mail avec une piece jointe @PostMapping("/attachment") public ResponseEntity sendAttachmentEmail(@RequestBody Mail mail) throws MessagingException { service.sendMailWithAttachments(mail);