2022-11-16 07:10:48 +00:00
|
|
|
package email_modules
|
2022-11-16 07:04:03 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"git.selly.red/Selly-Modules/natsio"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Config ...
|
|
|
|
type Config struct {
|
|
|
|
Nats natsio.Config
|
|
|
|
}
|
|
|
|
|
|
|
|
type Recipient struct {
|
|
|
|
To []string `json:"to,omitempty"`
|
|
|
|
From string `json:"from,omitempty"`
|
|
|
|
CC []string `json:"cc,omitempty"`
|
|
|
|
BCC []string `json:"bcc,omitempty"`
|
|
|
|
Subject string `json:"subject,omitempty"`
|
|
|
|
Attachment []Attachment `json:"attachment"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Attachment struct {
|
|
|
|
URL string `json:"url"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Data struct {
|
|
|
|
Password string `json:"password"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// SendPayload ...
|
|
|
|
type SendPayload struct {
|
|
|
|
Subject string `json:"subject"`
|
|
|
|
Recipient Recipient `json:"recipient"`
|
|
|
|
Data Data `json:"data"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// Response ...
|
|
|
|
type Response struct {
|
|
|
|
RequestID string `json:"requestId"`
|
|
|
|
}
|