sys_email.go 570 B

1234567891011121314151617181920
  1. package router
  2. import (
  3. "github.com/flipped-aurora/gin-vue-admin/server/middleware"
  4. "github.com/flipped-aurora/gin-vue-admin/server/plugin/email/api"
  5. "github.com/gin-gonic/gin"
  6. )
  7. type EmailRouter struct {
  8. }
  9. func (s *EmailRouter) InitEmailRouter(Router *gin.RouterGroup) {
  10. emailRouter := Router.Use(middleware.OperationRecord())
  11. var EmailApi = api.ApiGroupApp.EmailApi.EmailTest
  12. var SendEmail = api.ApiGroupApp.EmailApi.SendEmail
  13. {
  14. emailRouter.POST("emailTest", EmailApi) // 发送测试邮件
  15. emailRouter.POST("sendEmail", SendEmail) // 发送邮件
  16. }
  17. }