patterns

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailMessage

type MailMessage struct {
	From    mail.Address
	To      mail.Address
	Subject string
	Body    string
	IsHtml  bool
}

func (*MailMessage) SetFrom

func (m *MailMessage) SetFrom(name, email string)

func (*MailMessage) SetTo

func (m *MailMessage) SetTo(name, email string)

func (*MailMessage) ToHtml

func (m *MailMessage) ToHtml() []byte

func (*MailMessage) ToString

func (m *MailMessage) ToString() string

type MailSender

type MailSender struct {
	Config       SmtpConfig
	HtmlTemplate string
}

func (*MailSender) GetEmailAddress

func (s *MailSender) GetEmailAddress() string

func (*MailSender) Send

func (s *MailSender) Send(message *MailMessage) error

type SmtpConfig

type SmtpConfig struct {
	SmtpServer      string `toml:"SMTP_SERVER"`
	AuthUsername    string `toml:"AUTH_USERNAME"`
	AuthPassword    string `toml:"AUTH_PASSWORD"`
	EmailSenderName string `toml:"EMAIL_SENDER_NAME"`
	EmailSender     string `toml:"EMAIL_SENDER"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL