gen_smtp_server (gen_smtp v1.3.1-1)

View Source

Setup ranch socket acceptor for gen_smtp_server_session

Summary

Functions

Return the list of active SMTP session pids.

Start the listener with callback module Module with default options linked to no process.

Start the listener with callback module Module with options Options linked to no process.

Start the listener as a registered process with callback module Module with options Options linked to no process.

Stop the listener pid() Pid with reason normal.

Types

options/0

-type options() ::
          [{domain, string()} |
           {address, inet:ip4_address()} |
           {family, inet | inet6} |
           {port, inet:port_number()} |
           {protocol, tcp | ssl} |
           {ranch_opts, ranch:opts()} |
           {sessionoptions, gen_smtp_server_session:options()}].

server_name/0

-type server_name() :: any().

Functions

child_spec(ServerName, CallbackModule, Options)

sessions(Name)

-spec sessions(Name :: server_name()) -> [pid()].

Return the list of active SMTP session pids.

start(CallbackModule)

-spec start(CallbackModule :: atom()) -> {ok, pid()} | ignore | {error, any()}.

Start the listener with callback module Module with default options linked to no process.

start(CallbackModule, Options)

-spec start(CallbackModule :: module(), Options :: options()) -> {ok, pid()} | ignore | {error, any()}.

Start the listener with callback module Module with options Options linked to no process.

start(ServerName, CallbackModule, Options)

-spec start(ServerName :: server_name(), CallbackModule :: module(), Options :: options()) ->
               {ok, pid()} | {error, any()}.

Start the listener as a registered process with callback module Module with options Options linked to no process.

stop(Name)

-spec stop(Name :: server_name()) -> ok.

Stop the listener pid() Pid with reason normal.