You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
538 B

  1. package v1
  2. import (
  3. "fmt"
  4. "gin-vue-admin/global/response"
  5. "gin-vue-admin/service"
  6. "github.com/gin-gonic/gin"
  7. )
  8. // @Tags system
  9. // @Summary 发送测试邮件
  10. // @Security ApiKeyAuth
  11. // @Produce application/json
  12. // @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
  13. // @Router /email/emailTest [post]
  14. func EmailTest(c *gin.Context) {
  15. err := service.EmailTest()
  16. if err != nil {
  17. response.FailWithMessage(fmt.Sprintf("发送失败,%v", err), c)
  18. } else {
  19. response.OkWithData("发送成功", c)
  20. }
  21. }