123456789101112131415161718192021222324252627 |
- package services
- import (
- "eta_gn/eta_api/utils"
- openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
- dm "github.com/alibabacloud-go/dm-20151123/v2/client"
- "github.com/alibabacloud-go/tea/tea"
- )
- // AliyunEmail 阿里云邮件
- type AliyunEmail struct {
- Client *dm.Client
- }
- // NewClient 创建新的链接
- func (em *AliyunEmail) NewClient() (err error) {
- config := &openapi.Config{
- AccessKeyId: tea.String(utils.AliyunEmailAccessKeyId),
- AccessKeySecret: tea.String(utils.AliyunEmailAccessKeySecret),
- }
- // 访问的域名
- config.Endpoint = tea.String("dm.aliyuncs.com")
- _result, _err := dm.NewClient(config)
- em.Client = _result
- err = _err
- return
- }
|