mail

package
v0.16.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient interface {
	API(rest.Request) (*rest.Response, error)
}

type GoogleGroup

type GoogleGroup string

GoogleGroup is a simple google group representation

const (
	KubernetesAnnounceGoogleGroup     GoogleGroup = "kubernetes-announce"
	KubernetesDevGoogleGroup          GoogleGroup = "dev"
	KubernetesAnnounceTestGoogleGroup GoogleGroup = "kubernetes-announce-test"
)

type SendClient

type SendClient interface {
	Send(*mail.SGMailV3) (*rest.Response, error)
}

type SendError

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

func (*SendError) Error

func (s *SendError) Error() string

type Sender

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

func NewSender

func NewSender(apiKey string) *Sender

func (*Sender) GetRecipients added in v0.13.0

func (s *Sender) GetRecipients() []*mail.Email

GetRecipients can be used to get the recipients

func (*Sender) Send

func (s *Sender) Send(body, subject string) error

func (*Sender) SetAPIClient

func (s *Sender) SetAPIClient(client APIClient)

SetSendClient can be used to set the sendgrid API client

func (*Sender) SetDefaultSender

func (s *Sender) SetDefaultSender() error

func (*Sender) SetGoogleGroupRecipients

func (s *Sender) SetGoogleGroupRecipients(groups ...GoogleGroup) error

SetGoogleGroupRecipient can be used to set multiple Google Groups as recipient

func (*Sender) SetRecipients

func (s *Sender) SetRecipients(recipientArgs ...string) error

func (*Sender) SetSendClient

func (s *Sender) SetSendClient(client SendClient)

SetSendClient can be used to set the sendgrid sender client

func (*Sender) SetSender

func (s *Sender) SetSender(name, email string) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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