SMTP notifier for Agent Vault with TLS support and config loading.
// Source: https://github.com/Infisical/agent-vault | License: MIT | Copyright 2022 Infisical Inc
// Provided via justclaw.it.com; keep this notice with the code.
// Package notify provides SMTP email notification support for Agent Vault.
package notify
import (
"crypto/tls"
"fmt"
"net"
"net/mail"
"net/smtp"
"os"
"strconv"
"strings"
"time"
)
// SMTPConfig holds the SMTP server configuration loaded from environment variables.
type SMTPConfig struct {
Host string
Port int
Username string
Password string
From string
FromName string // Display name for From header (default "Agent Vault")
TLSMode string // "opportunistic" (default), "required", "none"
TLSSkipVerify bool // Skip TLS certificate verification
}
// LoadSMTPConfig
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key