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


Public Types | |
| using | Endpoint = typename Protocol::Endpoint |
Public Types inherited from join::BasicSmtpClient< Protocol > | |
| using | Endpoint = typename Protocol::Endpoint |
| using | Stream = typename Protocol::Stream |
Public Member Functions | |
| BasicSmtpSecureClient (TlsContext ctx, const char *host, uint16_t port=Protocol::defaultPort) | |
| create the basic SMTPS client instance using the given context. | |
| BasicSmtpSecureClient (TlsContext ctx, const std::string &host, uint16_t port=Protocol::defaultPort) | |
| create the basic SMTPS client instance using the given context. | |
| BasicSmtpSecureClient (const BasicSmtpSecureClient &other)=delete | |
| create the basic SMTPS client instance by copy. | |
| BasicSmtpSecureClient & | operator= (const BasicSmtpSecureClient &other)=delete |
| assign the basic SMTPS client instance by copy. | |
| BasicSmtpSecureClient (BasicSmtpSecureClient &&other) | |
| create the basic SMTPS client instance by move. | |
| BasicSmtpSecureClient & | operator= (BasicSmtpSecureClient &&other) |
| assign the basic SMTPS client instance by move. | |
| virtual | ~BasicSmtpSecureClient ()=default |
| destroy the basic SMTPS client instance. | |
| std::string | scheme () const override |
| get scheme. | |
Public Member Functions inherited from join::BasicSmtpClient< Protocol > | |
| 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. | |
| 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 | |
| int | connect (const Endpoint &endpoint) override |
| make a connection to the given endpoint. | |
Protected Member Functions inherited from join::BasicSmtpClient< Protocol > | |
| 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. | |
Additional Inherited Members | |
Protected Attributes inherited from join::BasicSmtpClient< Protocol > | |
| Stream | _stream |
| stream. | |
| std::string | _host |
| SMTP host. | |
| uint16_t | _port |
| SMTP port. | |
| std::string | _login |
| SMTP login. | |
| std::string | _password |
| SMTP password. | |
Basic SMTPS client.
| using join::BasicSmtpSecureClient< Protocol >::Endpoint = typename Protocol::Endpoint |
|
inline |
create the basic SMTPS client instance using the given context.
| ctx | TLS context to use for the encryption layer. |
| host | host. |
| port | port (default: 465). |
|
inline |
create the basic SMTPS client instance using the given context.
| ctx | TLS context to use for the encryption layer. |
| host | host. |
| port | port (default: 465). |
|
delete |
create the basic SMTPS client instance by copy.
| other | request to copy. |
|
inline |
create the basic SMTPS client instance by move.
| other | request to move. |
|
virtualdefault |
destroy the basic SMTPS client instance.
|
inlineoverrideprotectedvirtual |
make a connection to the given endpoint.
| endpoint | endpoint to connect to. |
Reimplemented from join::BasicSmtpClient< Protocol >.
|
inline |
assign the basic SMTPS client instance by move.
| other | request to move. |
|
delete |
assign the basic SMTPS client instance by copy.
| other | request to copy. |
|
inlineoverridevirtual |