Module gen_smtp_server_session

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

Behaviours: gen_server, ranch_protocol.

This module defines the gen_smtp_server_session behaviour.
Required callback functions: init/4, code_change/3, handle_HELO/2, handle_EHLO/3, handle_STARTTLS/1, 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, terminate/2.
Optional callback functions: handle_info/2, handle_AUTH/4, handle_error/3.

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.

Data Types

error_class()

error_class() = tcp_closed | tcp_error | ssl_closed | ssl_error | data_rejected | timeout | out_of_order | ssl_handshake_error | send_error | setopts_error | data_receive_error

options()

options() = [{callbackoptions, any()} | {certfile, file:name_all()} | {keyfile, file:name_all()} | {allow_bare_newlines, false | ignore | fix | strip} | {hostname, inet:hostname()} | {tls_options, [tls_opt()]}]

tls_opt()

tls_opt() = ssl:tls_server_option()

tls_opt()

tls_opt() = ssl:tls_server_option()

Function Index

ranch_init/1
start_link/3Start a SMTP session linked to the calling process.
start_link/4

Function Details

ranch_init/1

ranch_init(X1) -> any()

start_link/3

start_link(Ref::ranch:ref(), Transport::module(), Options::{Callback::module(), Options::options()}) -> {ok, pid()}

Start a SMTP session linked to the calling process.

See also: start/3.

start_link/4

start_link(Ref, Sock, Transport, Options) -> any()


Generated by EDoc