Documentation ¶
Overview ¶
sender.go
sender_api.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIEmailSender ¶
type APIEmailSender struct {
// contains filtered or unexported fields
}
func NewAPIEmailSender ¶
func NewAPIEmailSender(baseURL, apiKey, fromEmail, fromName string) *APIEmailSender
NewAPIEmailSender creates a new APIEmailSender instance
type Attachment ¶
type EmailAddress ¶
type EmailSender ¶
type EmailSender interface { SendEmail( subject string, content string, to []string, cc []string, bcc []string, attachFiles []string, ) error }
EmailSender interface to send emails
type MailPayload ¶
type MailPayload struct { From EmailAddress `json:"from"` To []EmailAddress `json:"to"` Cc []EmailAddress `json:"cc,omitempty"` Bcc []EmailAddress `json:"bcc,omitempty"` Subject string `json:"subject"` Text string `json:"text"` Category string `json:"category"` Attachments []Attachment `json:"attachments,omitempty"` }
type SMTPSender ¶
type SMTPSender struct {
// contains filtered or unexported fields
}
SMTPSender struct for SMTP email sending
func NewSMTPSender ¶
func NewSMTPSender(name string, address string, host string, port string, username string, password string) *SMTPSender
NewSMTPSender creates a new SMTPSender instance
Click to show internal directories.
Click to hide internal directories.