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
617 B

  1. package system
  2. import (
  3. "gin-vue-admin/global"
  4. "gin-vue-admin/model/common/response"
  5. "github.com/gin-gonic/gin"
  6. "go.uber.org/zap"
  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 (s *SystemApi) EmailTest(c *gin.Context) {
  15. if err := emailService.EmailTest(); err != nil {
  16. global.GVA_LOG.Error("发送失败!", zap.Any("err", err))
  17. response.FailWithMessage("发送失败", c)
  18. } else {
  19. response.OkWithData("发送成功", c)
  20. }
  21. }