|
join 1.0
lightweight network framework library
|
Basic SMTPS client. More...
#include <smtpclient.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 (const char *host, uint16_t port=465) | |
| create the basic SMTPS client instance. | |
| BasicSmtpSecureClient (const std::string &host, uint16_t port=465) | |
| create the basic SMTPS client instance. | |
| 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=25) | |
| create the basic SMTP client instance. | |
| BasicSmtpClient (const std::string &host, uint16_t port=25) | |
| create the basic SMTP client instance. | |
| 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 | setCertificate (const std::string &cert, const std::string &key="") |
| set the certificate and the private key. | |
| int | setCaPath (const std::string &caPath) |
| set the location of the trusted CA certificates. | |
| int | setCaFile (const std::string &caFile) |
| set the location of the trusted CA certificate file. | |
| void | setVerify (bool verify, int depth=-1) |
| Enable/Disable the verification of the peer certificate. | |
| int | setCipher (const std::string &cipher) |
| set the cipher list (TLSv1.2 and below). | |
| int | setCipher_1_3 (const std::string &cipher) |
| set the cipher list (TLSv1.3). | |
| int | send (const MailMessage &mail) |
| 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 MailMessage &message) |
| send sender address. | |
| int | sendTo (const MailMessage &message) |
| send recpient address. | |
| int | sendData (const MailMessage &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.
| host | host. |
| port | port (default: 465). |
|
inline |
create the basic SMTPS client instance.
| 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 |