Documentation ¶
Index ¶
- type SMTPProvider
- func (s *SMTPProvider) Close()
- func (s *SMTPProvider) GetConfig() mailingpb.MailingProviderConfig
- func (s *SMTPProvider) GetDefaultFromAddress() *mail.Address
- func (s *SMTPProvider) GetDefinition() mailprovider2.MailingProviderDefinition
- func (s *SMTPProvider) GetID() string
- func (s *SMTPProvider) IsVerified() bool
- func (s *SMTPProvider) Send(ctx context.Context, msg *message.Message) error
- func (s *SMTPProvider) Type() mailingpb.MailingProviderType
- func (s *SMTPProvider) UpdateConfig(config *mailingpb.MailingProviderConfig) error
- func (s *SMTPProvider) Verify(ctx context.Context) error
- type SMTPProvidersConfig
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 ¶
func New(mc *SMTPProvidersConfig, p mailprovider2.MailingProviderDefinition, log *logrus.Entry) (*SMTPProvider, error)
New creates a new SMTP provider.
func (*SMTPProvider) GetConfig ¶
func (s *SMTPProvider) GetConfig() mailingpb.MailingProviderConfig
func (*SMTPProvider) GetDefaultFromAddress ¶
func (s *SMTPProvider) GetDefaultFromAddress() *mail.Address
GetDefaultFromAddress returns the default from address.
func (*SMTPProvider) GetDefinition ¶
func (s *SMTPProvider) GetDefinition() mailprovider2.MailingProviderDefinition
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) Type ¶
func (s *SMTPProvider) Type() mailingpb.MailingProviderType
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.
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 ¶
NewSMTPProvidersConfig creates a new SMTP providers configuration.
Click to show internal directories.
Click to hide internal directories.