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);