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.

24 lines
611 B

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