123456789101112131415161718192021222324252627282930313233 |
- 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
- }
|