Documentation
¶
Overview ¶
Package mailout contains the mailOut node implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MailOutConfig ¶
type MailOutConfig struct {
// Host is the SMTP server host.
Host string `json:"host"`
// Port is the SMTP server port. Zero picks the default for the
// security mode: 465 (tls), 587 (starttls), 25 (plain).
Port int `json:"port"`
// Security selects the transport: "tls" (implicit TLS on connect),
// "starttls" (upgrade after connect, the default) or "plain".
Security string `json:"security"`
// From is the envelope/header sender address.
From string `json:"from"`
// To/Cc/Bcc are the default recipients; message metadata overrides.
To string `json:"to"`
Cc string `json:"cc"`
Bcc string `json:"bcc"`
// Subject is the default subject; the message's topic metadata
// (or mail.subject) overrides it.
Subject string `json:"subject"`
// HTML marks the body Content-Type text/html instead of text/plain.
HTML bool `json:"html"`
// Username/Password are optional SMTP-AUTH credentials. They are
// credential-typed fields: stored outside the exported flow
// document and merged back in at deploy time.
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
}
MailOutConfig holds configuration for the mailOut node.
type MailOutNode ¶
MailOutNode sends the incoming message as an e-mail via SMTP and passes the input through unchanged.
func NewMailOutNode ¶
func NewMailOutNode(node nodestore.NodeInterface, config *MailOutConfig) *MailOutNode
NewMailOutNode creates a new mailOut node
func (*MailOutNode) Execute ¶
func (n *MailOutNode) Execute(ctx context.Context, input nodestore.MessageInterface) (nodestore.MessageInterface, error)
Execute builds the e-mail from config + message overrides and sends it through the configured server.
func (*MailOutNode) Validate ¶
func (n *MailOutNode) Validate() error
Validate checks the mailOut node configuration