Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailPayload ¶
type EmailPayload struct {
Subject string
Content string
To []string
CC []string
BCC []string
AttachFiles []string
}
EmailPayload is a struct to send email
type EmailSender ¶
type EmailSender interface {
SendEmail(payload EmailPayload) error
}
EmailSender is an interface to send email
func NewGmailSender ¶
func NewGmailSender(name string, fromEmailAddress string, fromEmailPassword string) EmailSender
NewGmailSender creates a new Gmail sender
func NewSesEmailSender ¶
func NewSesEmailSender() (EmailSender, error)
NewSesEmailSender initializes a new SesEmailSender
type GmailSender ¶
type GmailSender struct {
// contains filtered or unexported fields
}
GmailSender is a struct to send email using Gmail
func (*GmailSender) SendEmail ¶
func (gmail *GmailSender) SendEmail(payload EmailPayload) error
SendEmail sends an email using Gmail
type SesEmailSender ¶
type SesEmailSender struct {
// contains filtered or unexported fields
}
SesEmailSender is an email sender that uses AWS SES
func (*SesEmailSender) SendEmail ¶
func (sesSender *SesEmailSender) SendEmail(payload EmailPayload) error
SendEmail sends an email with optional attachments via AWS SES
Click to show internal directories.
Click to hide internal directories.