smtpmailprovider

package
v0.0.0-...-6531ba9 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMTPProvider

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

SMTPProvider is a provider that sends emails via SMTP.

func New

New creates a new SMTP provider.

func (*SMTPProvider) Close

func (s *SMTPProvider) Close()

Close closes the provider.

func (*SMTPProvider) GetConfig

func (*SMTPProvider) GetDefaultFromAddress

func (s *SMTPProvider) GetDefaultFromAddress() *mail.Address

GetDefaultFromAddress returns the default from address.

func (*SMTPProvider) GetDefinition

GetDefinition returns the provider definition.

func (*SMTPProvider) GetID

func (s *SMTPProvider) GetID() string

GetID returns the ID of the provider.

func (*SMTPProvider) IsVerified

func (s *SMTPProvider) IsVerified() bool

IsVerified returns whether the provider is verified.

func (*SMTPProvider) Send

func (s *SMTPProvider) Send(ctx context.Context, msg *message.Message) error

Send lets the provider send the input message.

func (*SMTPProvider) Type

Type returns the type of the provider.

func (*SMTPProvider) UpdateConfig

func (s *SMTPProvider) UpdateConfig(config *mailingpb.MailingProviderConfig) error

UpdateConfig updates the config of the provider.

func (*SMTPProvider) Verify

func (s *SMTPProvider) Verify(ctx context.Context) error

Verify verifies the provider configuration.

type SMTPProvidersConfig

type SMTPProvidersConfig struct {
	Domain string
}

SMTPProvidersConfig is a configuration used for SMTP providers. It provides common configuration for the SMTP providers, like the domain name used for the HELO command.

func NewSMTPProvidersConfig

func NewSMTPProvidersConfig(cfg *mailing.Config, log *logrus.Entry) (*SMTPProvidersConfig, error)

NewSMTPProvidersConfig creates a new SMTP providers configuration.

Jump to

Keyboard shortcuts

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