forwardemail

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package forwardemail provisions members' personal @bbs email addresses by creating aliases on forwardemail.net (https://forwardemail.net) via its REST API. A premium member gets <username>@<domain> forwarded to the real email they verified at join@. When unconfigured (no API key) Configured() reports false and callers just display the address without creating it.

Config (env):

AGENTBBS_FORWARDEMAIL_API_KEY   forwardemail.net API key (HTTP basic user)
AGENTBBS_FORWARDEMAIL_DOMAIN    alias domain (defaults to the BBS host)
AGENTBBS_WEBMAIL_URL            webmail interface URL shown to members

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey  string
	Domain  string
	Webmail string
}

Config holds the forwardemail.net credentials and the alias domain.

func ConfigFromEnv

func ConfigFromEnv() Config

ConfigFromEnv reads the forwardemail settings from the environment.

func (Config) Address

func (c Config) Address(localPart string) string

Address is the personal email for a username, e.g. alice@bbs.profullstack.com.

func (Config) Configured

func (c Config) Configured() bool

Configured reports whether aliases can actually be created.

func (Config) CreateAlias

func (c Config) CreateAlias(localPart, recipient string) error

CreateAlias creates (or confirms) localPart@Domain forwarding to recipient. It is idempotent: an "already exists" response is treated as success.

func (Config) WebmailURL

func (c Config) WebmailURL() string

WebmailURL is the webmail interface members use to read their mail (may be "").

Jump to

Keyboard shortcuts

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