View Source gen_smtp_server (gen_smtp v1.2.0)

Setup ranch socket acceptor for gen_smtp_server_session

Link to this section 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.

Link to this section Types

Specs

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()}].

Specs

server_name() :: any().

Link to this section Functions

Link to this function

child_spec(ServerName, CallbackModule, Options)

View Source

Specs

sessions(Name :: server_name()) -> [pid()].
Return the list of active SMTP session pids.

Specs

start(CallbackModule :: atom()) -> {ok, pid()} | ignore | {error, any()}.
Start the listener with callback module Module with default options linked to no process.
Link to this function

start(CallbackModule, Options)

View Source

Specs

start(CallbackModule :: module(), Options :: options()) -> {ok, pid()} | ignore | {error, any()}.
Start the listener with callback module Module with options Options linked to no process.
Link to this function

start(ServerName, CallbackModule, Options)

View Source

Specs

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.

Specs

stop(Name :: server_name()) -> ok.
Stop the listener pid() Pid with reason normal.