commentaires
This commit is contained in:
parent
aece88e2a8
commit
382b1052d4
@ -20,18 +20,21 @@ public class MailController {
|
||||
this.service = service;
|
||||
}
|
||||
|
||||
// Envoi de mail en text brut
|
||||
@PostMapping("/text")
|
||||
public ResponseEntity<String> 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<String> 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<String> sendAttachmentEmail(@RequestBody Mail mail) throws MessagingException {
|
||||
service.sendMailWithAttachments(mail);
|
||||
|
Loading…
Reference in New Issue
Block a user