View Source Disposable (Disposable v0.2.0)

Checks whether an email address uses a disposable domain.

Email handling is intentionally limited validation: the value must be a printable UTF-8 string with one non-empty local part and a valid ASCII domain. This module does not implement complete RFC 5322 parsing.

Summary

Types

A disposable domain name represented as a UTF-8 string.

An email address represented as a UTF-8 string.

Functions

check(email) deprecated

Compatibility alias for disposable?/1; invalid and unavailable lookups return false.

Returns true only for a valid email whose exact domain is listed.

Loads a newline-delimited domain list from an administrator-controlled URL.

Looks up an email address without collapsing errors.

reload() deprecated

Reloads the configured source, preserving the active generation on failure.

Starts the ETS-backed domain store registered as Disposable.

Types

@type domain() :: String.t()

A disposable domain name represented as a UTF-8 string.

@type email() :: String.t()

An email address represented as a UTF-8 string.

Functions

This function is deprecated. use disposable?/1 instead.
@spec check(term()) :: boolean()

Compatibility alias for disposable?/1; invalid and unavailable lookups return false.

@spec disposable?(term()) :: boolean()

Returns true only for a valid email whose exact domain is listed.

@spec load_url(String.t()) :: :ok | {:error, term()}

Loads a newline-delimited domain list from an administrator-controlled URL.

Redirects, non-200 responses, invalid content, and transport failures leave the active generation unchanged.

@spec lookup(term()) :: {:ok, boolean()} | {:error, :invalid_email | :not_running}

Looks up an email address without collapsing errors.

Returns {:ok, boolean()} for valid input, or {:error, reason} for :invalid_email and :not_running.

This function is deprecated. use the configured source and an administrator-controlled refresh operation.
@spec reload() :: :ok | {:error, term()}

Reloads the configured source, preserving the active generation on failure.

This function is deprecated. the application starts the store automatically.
@spec start_link(keyword()) :: GenServer.on_start()

Starts the ETS-backed domain store registered as Disposable.