smtp

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: Apache-2.0 Imports: 18 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 {
	Host      string
	Port      int
	Username  string
	Password  string
	FromName  string
	FromEmail string
	UseTLS    bool
}

func NewClient

func NewClient(ctx core.IntegrationContext) (*Client, error)

func (*Client) SendEmail

func (c *Client) SendEmail(email Email) (*SendResult, error)

SendEmail sends an email using the SMTP server

func (*Client) Verify

func (c *Client) Verify() error

Verify tests the SMTP connection and authentication

type Configuration

type Configuration struct {
	Host      string `json:"host" mapstructure:"host"`
	Port      string `json:"port" mapstructure:"port"`
	Username  string `json:"username" mapstructure:"username"`
	Password  string `json:"password" mapstructure:"password"`
	FromName  string `json:"fromName" mapstructure:"fromName"`
	FromEmail string `json:"fromEmail" mapstructure:"fromEmail"`
	UseTLS    bool   `json:"useTLS" mapstructure:"useTLS"`
}

type Email

type Email struct {
	To        []string
	Cc        []string
	Bcc       []string
	Subject   string
	TextBody  string
	HTMLBody  string
	FromName  string
	FromEmail string
	ReplyTo   string
}

type SMTP

type SMTP struct{}

func (*SMTP) Actions added in v0.6.0

func (s *SMTP) Actions() []core.Action

func (*SMTP) Cleanup added in v0.6.0

func (s *SMTP) Cleanup(ctx core.IntegrationCleanupContext) error

func (*SMTP) Components

func (s *SMTP) Components() []core.Component

func (*SMTP) Configuration

func (s *SMTP) Configuration() []configuration.Field

func (*SMTP) Description

func (s *SMTP) Description() string

func (*SMTP) HandleAction added in v0.6.0

func (s *SMTP) HandleAction(ctx core.IntegrationActionContext) error

func (*SMTP) HandleRequest

func (s *SMTP) HandleRequest(ctx core.HTTPRequestContext)

func (*SMTP) Icon

func (s *SMTP) Icon() string

func (*SMTP) Instructions

func (s *SMTP) Instructions() string

func (*SMTP) Label

func (s *SMTP) Label() string

func (*SMTP) ListResources

func (s *SMTP) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*SMTP) Name

func (s *SMTP) Name() string

func (*SMTP) Sync

func (s *SMTP) Sync(ctx core.SyncContext) error

func (*SMTP) Triggers

func (s *SMTP) Triggers() []core.Trigger

type SendEmail

type SendEmail struct{}

func (*SendEmail) Actions

func (c *SendEmail) Actions() []core.Action

func (*SendEmail) Cancel

func (c *SendEmail) Cancel(ctx core.ExecutionContext) error

func (*SendEmail) Cleanup added in v0.7.0

func (c *SendEmail) Cleanup(ctx core.SetupContext) error

func (*SendEmail) Color

func (c *SendEmail) Color() string

func (*SendEmail) Configuration

func (c *SendEmail) Configuration() []configuration.Field

func (*SendEmail) Description

func (c *SendEmail) Description() string

func (*SendEmail) Documentation

func (c *SendEmail) Documentation() string

func (*SendEmail) ExampleOutput

func (c *SendEmail) ExampleOutput() map[string]any

func (*SendEmail) Execute

func (c *SendEmail) Execute(ctx core.ExecutionContext) error

func (*SendEmail) HandleAction

func (c *SendEmail) HandleAction(ctx core.ActionContext) error

func (*SendEmail) HandleWebhook

func (c *SendEmail) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*SendEmail) Icon

func (c *SendEmail) Icon() string

func (*SendEmail) Label

func (c *SendEmail) Label() string

func (*SendEmail) Name

func (c *SendEmail) Name() string

func (*SendEmail) OutputChannels

func (c *SendEmail) OutputChannels(configuration any) []core.OutputChannel

func (*SendEmail) ProcessQueueItem

func (c *SendEmail) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*SendEmail) Setup

func (c *SendEmail) Setup(ctx core.SetupContext) error

type SendEmailConfiguration

type SendEmailConfiguration struct {
	To        string `json:"to" mapstructure:"to"`
	Cc        string `json:"cc" mapstructure:"cc"`
	Bcc       string `json:"bcc" mapstructure:"bcc"`
	Subject   string `json:"subject" mapstructure:"subject"`
	Body      string `json:"body" mapstructure:"body"`
	IsHTML    bool   `json:"isHTML" mapstructure:"isHTML"`
	FromName  string `json:"fromName" mapstructure:"fromName"`
	FromEmail string `json:"fromEmail" mapstructure:"fromEmail"`
	ReplyTo   string `json:"replyTo" mapstructure:"replyTo"`
}

type SendEmailMetadata

type SendEmailMetadata struct {
	To      []string `json:"to" mapstructure:"to"`
	Subject string   `json:"subject" mapstructure:"subject"`
}

type SendResult

type SendResult struct {
	Success   bool      `json:"success"`
	To        []string  `json:"to"`
	Cc        []string  `json:"cc,omitempty"`
	Bcc       []string  `json:"bcc,omitempty"`
	Subject   string    `json:"subject"`
	SentAt    time.Time `json:"sentAt"`
	FromEmail string    `json:"fromEmail"`
}

Jump to

Keyboard shortcuts

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