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.

32 lines
766 B

package service
import (
"github.com/flipped-aurora/gin-vue-admin/server/plugin/email/utils"
)
type EmailService struct{}
//@author: [maplepie](https://github.com/maplepie)
//@function: EmailTest
//@description: 发送邮件测试
//@return: err error
func (e *EmailService) EmailTest() (err error) {
subject := "test"
body := "test"
err = utils.EmailTest(subject, body)
return err
}
//@author: [maplepie](https://github.com/maplepie)
//@function: EmailTest
//@description: 发送邮件测试
//@return: err error
//@params to string 收件人
//@params subject string 标题(主题)
//@params body string 邮件内容
func (e *EmailService) SendEmail(to, subject, body string) (err error) {
err = utils.Email(to, subject, body)
return err
}