email

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(sender Sender, frontendURL string) *Client

func (*Client) SendOrganizationAdditionNotification added in v0.24.3

func (c *Client) SendOrganizationAdditionNotification(toEmail, toName, orgName, roleName string) error

func (*Client) SendOrganizationInvite

func (c *Client) SendOrganizationInvite(toEmail, toName, orgName, roleName string) error

func (*Client) SendProjectAdditionNotification added in v0.24.3

func (c *Client) SendProjectAdditionNotification(toEmail, toName, projectName, roleName string) error

func (*Client) SendProjectInvite

func (c *Client) SendProjectInvite(toEmail, toName, projectName, roleName string) error

type SMTPOptions

type SMTPOptions struct {
	SMTPHost     string
	SMTPPort     int
	SMTPUsername string
	SMTPPassword string
	FromEmail    string
	FromName     string
	BCC          string
}

type Sender

type Sender interface {
	Send(toEmail, toName, subject, body string) error
}

func NewConsoleSender

func NewConsoleSender(logger *zap.Logger, fromEmail, fromName string) (Sender, error)

func NewSMTPSender

func NewSMTPSender(opts *SMTPOptions) (Sender, error)

Jump to

Keyboard shortcuts

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