whycxzp
2023-07-05 ae9584e320c612b1bf9f32f327a5fcb4fc8fa3d8
src/main/java/com/whyc/controller/MailController.java
@@ -11,6 +11,8 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.mail.MessagingException;
@RestController
@RequestMapping("mail")
@Api(tags = "邮件")
@@ -21,7 +23,7 @@
    @ApiOperation("发送邮件")
    @PostMapping("sendMail")
    public Response sendMail(@RequestBody MailDTO mailDTO){
    public Response sendMail(@RequestBody MailDTO mailDTO) throws MessagingException {
        service.sendMail(mailDTO);
        return new Response().set(1,null,"发送完成");
    }