Documentation ¶
Index ¶
- func NewSMTP(logger logger.Logger) bindings.OutputBinding
- type Mailer
- func (s *Mailer) GetComponentMetadata() (metadataInfo metadata.MetadataMap)
- func (s *Mailer) Init(_ context.Context, metadata bindings.Metadata) error
- func (s *Mailer) Invoke(_ context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
- func (s *Mailer) Operations() []bindings.OperationKind
- type Metadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mailer ¶
type Mailer struct {
// contains filtered or unexported fields
}
Mailer allows sending of emails using the Simple Mail Transfer Protocol.
func (*Mailer) GetComponentMetadata ¶ added in v1.11.0
func (s *Mailer) GetComponentMetadata() (metadataInfo metadata.MetadataMap)
GetComponentMetadata returns the metadata of the component.
func (*Mailer) Invoke ¶
func (s *Mailer) Invoke(_ context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
Invoke sends an email message.
func (*Mailer) Operations ¶
func (s *Mailer) Operations() []bindings.OperationKind
Operations returns the allowed binding operations.
type Metadata ¶
type Metadata struct { Host string `mapstructure:"host"` Port int `mapstructure:"port"` User string `mapstructure:"user"` SkipTLSVerify bool `mapstructure:"skipTLSVerify"` Password string `mapstructure:"password"` EmailFrom string `mapstructure:"emailFrom"` EmailTo string `mapstructure:"emailTo"` EmailCC string `mapstructure:"emailCC"` EmailBCC string `mapstructure:"emailBCC"` Subject string `mapstructure:"subject"` Priority int `mapstructure:"priority"` }
Metadata holds standard email properties.
Click to show internal directories.
Click to hide internal directories.