Module gen_smtp_server_session

Process representing a SMTP session, extensible via a callback module.

Behaviours: gen_server.

This module defines the gen_smtp_server_session behaviour.
Required callback functions: code_change/3, handle_HELO/2, handle_EHLO/3, handle_MAIL/2, handle_MAIL_extension/2, handle_RCPT/2, handle_RCPT_extension/2, handle_DATA/4, handle_RSET/1, handle_VRFY/2, handle_other/3.
Optional callback functions: handle_info/2.

See also: smtp_server_example.

Description

Process representing a SMTP session, extensible via a callback module. This module is implemented as a behaviour that the callback module should implement. To see the details of the required callback functions to provide, please see smtp_server_example.

Function Index

start/3Start a SMTP session.
start_link/3Start a SMTP session linked to the calling process.

Function Details

start/3

start(Socket::port(), Module::atom(), Options::[tuple()]) -> {ok, pid()} | ignore | {error, any()}

Start a SMTP session. Arguments are Socket (probably opened via gen_smtp_server or an analogue), which is an abstract socket implemented via the socket module, Module is the name of the callback module implementing the SMTP session behaviour that you'd like to use and Options is the optional arguments provided by the accept server.

start_link/3

start_link(Socket::port(), Module::atom(), Options::[tuple()]) -> {ok, pid()} | ignore | {error, any()}

Start a SMTP session linked to the calling process.

See also: start/3.


Generated by EDoc