| 1 |
package dm |
| 2 |
|
| 3 |
import ( |
| 4 |
"net/http" |
| 5 |
|
| 6 |
"github.com/denverdino/aliyungo/common" |
| 7 |
) |
| 8 |
|
| 9 |
type SendEmailArgs struct { |
| 10 |
AccountName string |
| 11 |
AddressType string |
| 12 |
} |
| 13 |
|
| 14 |
type SendBatchMailArgs struct { |
| 15 |
SendEmailArgs |
| 16 |
TemplateName string |
| 17 |
ReceiverName string |
| 18 |
TagName string |
| 19 |
} |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
func (this *Client) SendBatchMail(args *SendBatchMailArgs) error { |
| 29 |
return this.InvokeByAnyMethod(http.MethodPost, BatchSendMail, "", args, &common.Response{}) |
| 30 |
} |
| 31 |
|
| 32 |
type SendSingleMailArgs struct { |
| 33 |
SendEmailArgs |
| 34 |
ReplyToAddress bool |
| 35 |
ToAddress string |
| 36 |
FromAlias string |
| 37 |
Subject string |
| 38 |
HtmlBody string |
| 39 |
TextBody string |
| 40 |
} |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
func (this *Client) SendSingleMail(args *SendSingleMailArgs) error { |
| 51 |
return this.InvokeByAnyMethod(http.MethodPost, SingleSendMail, "", args, &common.Response{}) |
| 52 |
} |