modif route controller mail
This commit is contained in:
parent
b47c3fdf6d
commit
f23b0fbb87
2 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
import javax.mail.MessagingException;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/mail")
|
||||
@RequestMapping("/sendmail")
|
||||
public class MailController {
|
||||
SendMailService service;
|
||||
|
||||
|
@ -20,7 +20,7 @@ public class MailController {
|
|||
this.service = service;
|
||||
}
|
||||
|
||||
@PostMapping("/send")
|
||||
@PostMapping("/text")
|
||||
public ResponseEntity<String> sendMail(@RequestBody Mail mail) {
|
||||
service.sendMail(mail);
|
||||
return new ResponseEntity<>("Email Sent successfully", HttpStatus.OK);
|
||||
|
|
|
@ -41,7 +41,7 @@ public class SendMailServiceImpl implements SendMailService {
|
|||
|
||||
helper.setSubject(mail.getSubject());
|
||||
|
||||
String htmlMsg = "<h3>Im testing send a HTML email</h3>"
|
||||
String htmlMsg = "<h3>Test d'envoi de mail au format HTML</h3>"
|
||||
+"<img src='http://www.apache.org/images/asf_logo_wide.gif'>";
|
||||
|
||||
msg.setContent(htmlMsg, "text/html");
|
||||
|
|
Loading…
Add table
Reference in a new issue