|
join 1.0
lightweight network framework library
|
basic SMTP client. More...
#include <smtp_client.hpp>

Public Types | |
| using | Endpoint = typename Protocol::Endpoint |
| using | Stream = typename Protocol::Stream |
Public Member Functions | |
| BasicSmtpClient (const char *host, uint16_t port=Protocol::defaultPort) | |
| create the basic SMTP client instance. | |
| BasicSmtpClient (const std::string &host, uint16_t port=Protocol::defaultPort) | |
| create the basic SMTP client instance. | |
| BasicSmtpClient (TlsContext ctx, const char *host, uint16_t port=Protocol::defaultPort) | |
| create the basic SMTP client instance using the given context. | |
| BasicSmtpClient (TlsContext ctx, const std::string &host, uint16_t port=Protocol::defaultPort) | |
| create the basic SMTP client instance using the given context. | |
| BasicSmtpClient (const BasicSmtpClient &other)=delete | |
| create the basic SMTP client instance by copy. | |
| BasicSmtpClient & | operator= (const BasicSmtpClient &other)=delete |
| assign the basic SMTP client instance by copy. | |
| BasicSmtpClient (BasicSmtpClient &&other) | |
| create the basic SMTP client instance by move. | |
| BasicSmtpClient & | operator= (BasicSmtpClient &&other) |
| assign the basic SMTP client instance by move. | |
| virtual | ~BasicSmtpClient ()=default |
| destroy the basic SMTP client instance. | |
| virtual std::string | scheme () const |
| get scheme. | |
| const std::string & | host () const |
| get host. | |
| uint16_t | port () const |
| get port. | |
| std::string | authority () const |
| get authority. | |
| std::string | url () const |
| get URL. | |
| void | credentials (const std::string &login, const std::string &password) |
| set credentials. | |
| int | send (const SmtpMessage &message) |
| send mail message. | |
Protected Member Functions | |
| virtual int | connect (const Endpoint &endpoint) |
| make a connection to the given endpoint. | |
| void | close () |
| close the connection. | |
| int | sendMessage (const std::string &message) |
| send message. | |
| std::string | readReplies (std::vector< std::string > *replies=nullptr) |
| read replies. | |
| int | greeting () |
| handle greeting. | |
| int | initialize (std::vector< std::string > &replies) |
| client init. | |
| int | startTls () |
| start encryption. | |
| int | loginAuthenticate () |
| authenticate using LOGIN. | |
| int | plainAuthenticate () |
| authenticate using PLAIN. | |
| int | sendFrom (const SmtpMessage &message) |
| send sender address. | |
| int | sendTo (const SmtpMessage &message) |
| send recpient address. | |
| int | sendData (const SmtpMessage &message) |
| send message. | |
| int | quit () |
| send quit. | |
| std::string | hostname () const |
| get host name. | |
Protected Attributes | |
| Stream | _stream |
| stream. | |
| std::string | _host |
| SMTP host. | |
| uint16_t | _port |
| SMTP port. | |
| std::string | _login |
| SMTP login. | |
| std::string | _password |
| SMTP password. | |
basic SMTP client.
| using join::BasicSmtpClient< Protocol >::Endpoint = typename Protocol::Endpoint |
| using join::BasicSmtpClient< Protocol >::Stream = typename Protocol::Stream |
|
inline |
create the basic SMTP client instance.
| host | host. |
| port | port (default: 25). |
|
inline |
create the basic SMTP client instance.
| host | host. |
| port | port (default: 25). |
|
inline |
create the basic SMTP client instance using the given context.
| ctx | TLS context used by the STARTTLS upgrade. |
| host | host. |
| port | port (default: 25). |
|
inline |
create the basic SMTP client instance using the given context.
| ctx | TLS context used by the STARTTLS upgrade. |
| host | host. |
| port | port (default: 25). |
|
delete |
create the basic SMTP client instance by copy.
| other | request to copy. |
|
inline |
create the basic SMTP client instance by move.
| other | request to move. |
|
virtualdefault |
destroy the basic SMTP client instance.
|
inline |
get authority.
|
inlineprotected |
close the connection.
|
inlineprotectedvirtual |
make a connection to the given endpoint.
| endpoint | endpoint to connect to. |
Reimplemented in join::BasicSmtpSecureClient< Protocol >.
|
inline |
set credentials.
| login | login. |
| password | password. |
|
inlineprotected |
handle greeting.
|
inline |
get host.
|
inlineprotected |
get host name.
|
inlineprotected |
client init.
| replies | server replies. |
|
inlineprotected |
authenticate using LOGIN.
|
inline |
assign the basic SMTP client instance by move.
| other | request to move. |
|
delete |
assign the basic SMTP client instance by copy.
| other | request to copy. |
|
inlineprotected |
authenticate using PLAIN.
|
inline |
get port.
|
inlineprotected |
send quit.
|
inlineprotected |
read replies.
| replies | replies to read. |
|
inlinevirtual |
|
inline |
send mail message.
| message | mail message to send. |
|
inlineprotected |
send message.
| message | message to send. |
|
inlineprotected |
send sender address.
| message | mail message. |
|
inlineprotected |
send message.
| message | message to send. |
|
inlineprotected |
send recpient address.
| message | mail message. |
|
inlineprotected |
start encryption.
|
inline |
get URL.
|
protected |
SMTP host.
|
protected |
SMTP login.
|
protected |
SMTP password.
|
protected |
SMTP port.
|
protected |
stream.