Documentation ¶
Index ¶
Constants ¶
View Source
const ( GMAIL_SMTP_HOST = "smtp.gmail.com" GMAIL_SMTP_PORT = "587" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GmailSender ¶
type GmailSender struct {
// contains filtered or unexported fields
}
GmailSender is a struct that represents a Gmail email sender.
func (*GmailSender) SendMail ¶
func (gmail *GmailSender) SendMail(mail Mail) error
SendMail sends an email using the GmailSender.
type Mail ¶
type Mail struct { To []string // List of recipients' email addresses. Cc []string // List of carbon copy recipients' email addresses. Bcc []string // List of blind carbon copy recipients' email addresses. Subject string // Email subject. Body string // Email body. Files []string // List of file paths to attach to the email. }
Mail represents an email message.
type MailSender ¶
MailSender is an interface for sending emails.
func NewGmailSender ¶
func NewGmailSender(config Config) (MailSender, error)
NewGmailSender creates a new GmailSender instance with the provided GmailSMTP configuration.
Click to show internal directories.
Click to hide internal directories.