| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.mail.MessagingException; |
| | | |
| | | @RestController |
| | | @RequestMapping("mail") |
| | | @Api(tags = "邮件") |
| | |
| | | |
| | | @ApiOperation("发送邮件") |
| | | @PostMapping("sendMail") |
| | | public Response sendMail(@RequestBody MailDTO mailDTO) throws MessagingException { |
| | | service.sendMail(mailDTO); |
| | | return new Response().set(1,null,"发送完成"); |
| | | public Response sendMail(@RequestBody MailDTO mailDTO){ |
| | | return service.sendMail(mailDTO); |
| | | } |
| | | |
| | | } |