|
| | SmtpConnect (Logger *log=nullptr) |
| | Default constructor. More...
|
| |
| int | command (const String &cmd, bool encodeCommand=false, bool decodeResponse=false) |
| |
|
Strings & | response () |
| | The response from the server - makes sence after calling any command.
|
| |
| void | cmd_auth (const String &user, const String &password) |
| | Logs in to the server host() More...
|
| |
| void | cmd_send () |
| | Sends the message. More...
|
| |
| void | cmd_quit () |
| |
| void | sendMessage () override |
| | Sends the message. More...
|
| |
| | BaseMailConnect ()=default |
| |
| virtual | ~BaseMailConnect ()=default |
| |
| String | from () const noexcept |
| |
| void | from (const String &addr) |
| |
| String | to () const noexcept |
| |
| void | to (const String &addr) |
| |
| String | cc () const noexcept |
| |
| void | cc (const String &addr) |
| |
| String | bcc () const noexcept |
| |
| void | bcc (const String &addr) |
| |
| String | subject () const noexcept |
| |
| void | subject (const String &subj) |
| |
| String | body () const noexcept |
| |
| void | body (const String &body, bool smtp) |
| | Sets the current plain text part of e-mail message. More...
|
| |
| String | attachments () const noexcept |
| |
| void | attachments (const String &attachments) |
| |
| const Buffer & | messageBuffer () const noexcept |
| |
| void | mimeMessage (Buffer &buffer) |
| |
| virtual void | sendMessage ()=0 |
| |
| | TCPSocket (SOCKET_ADDRESS_FAMILY domain=AF_INET, int32_t type=SOCK_STREAM, int32_t protocol=0) |
| |
| | ~TCPSocket () override |
| |
| void | setProxy (std::shared_ptr< Proxy > proxy) |
| |
| void | close () noexcept override |
| |
| virtual bool | accept (SOCKET &clientSocketFD, struct sockaddr_in &clientInfo, std::chrono::milliseconds timeout) |
| |
| size_t | socketBytes () override |
| |
| bool | readyToRead (std::chrono::milliseconds timeout) override |
| |
| size_t | readLine (char *buffer, size_t size, char delimiter='\n') |
| |
| size_t | readLine (Buffer &buffer, char delimiter='\n') |
| |
| size_t | readLine (String &s, char delimiter='\n') |
| |
| size_t | read (uint8_t *buffer, size_t size, sockaddr_in *from=nullptr) override |
| |
| size_t | read (Buffer &buffer, size_t size, sockaddr_in *from=nullptr) override |
| |
| size_t | read (String &buffer, size_t size, sockaddr_in *from=nullptr) override |
| |
|
template<typename T > |
| size_t | read (T &value, sockaddr_in *from=nullptr) |
| |
| SOCKET | fd () const |
| |
| void | open_addr (OpenMode openMode=OpenMode::CREATE, const sockaddr_in *addr=nullptr, std::chrono::milliseconds timeout=std::chrono::milliseconds(0)) |
| |
| | BaseSocket (SOCKET_ADDRESS_FAMILY domain=AF_INET, int32_t type=SOCK_STREAM, int32_t protocol=0) |
| |
| | BaseSocket (const BaseSocket &other)=delete |
| |
| | BaseSocket (BaseSocket &&other) noexcept=default |
| |
|
virtual | ~BaseSocket () |
| | Destructor.
|
| |
| BaseSocket & | operator= (const BaseSocket &other)=delete |
| |
| BaseSocket & | operator= (BaseSocket &&other) noexcept=default |
| |
| void | blockingMode (bool blocking) |
| |
| virtual size_t | socketBytes () |
| |
| virtual void | attach (SOCKET socketHandle, bool accept) |
| |
| virtual SOCKET | detach () |
| |
| void | host (const Host &host) |
| |
| const Host & | host () const |
| |
| void | open (const Host &host=Host(), OpenMode openMode=OpenMode::CONNECT, bool blockingMode=true, std::chrono::milliseconds timeoutMS=std::chrono::milliseconds(0)) |
| |
| void | open (const struct sockaddr_in &address, OpenMode openMode=OpenMode::CONNECT, bool blockingMode=true, std::chrono::milliseconds timeoutMS=std::chrono::milliseconds(0)) |
| |
| void | bind (const char *address, uint32_t portNumber) |
| |
| void | listen (uint16_t portNumber=0) |
| |
| virtual void | close () noexcept |
| |
| bool | active () const |
| |
| int32_t | control (int flag, const uint32_t *check) const |
| |
| void | setOption (int level, int option, int value) const |
| |
| void | getOption (int level, int option, int &value) const |
| |
| virtual size_t | recv (uint8_t *buffer, size_t len) |
| |
| virtual size_t | send (const uint8_t *buffer, size_t len) |
| |
| virtual size_t | read (uint8_t *buffer, size_t size, sockaddr_in *from) |
| |
| virtual size_t | read (uint8_t *buffer, size_t size) |
| |
| virtual size_t | read (Buffer &buffer, size_t size, sockaddr_in *from) |
| |
| size_t | read (Buffer &buffer, size_t size) |
| |
| virtual size_t | read (String &buffer, size_t size, sockaddr_in *from) |
| |
| size_t | read (String &buffer, size_t size) |
| |
| virtual size_t | write (const uint8_t *buffer, size_t size, const sockaddr_in *peer) |
| |
| size_t | write (const uint8_t *buffer, size_t size) |
| |
| virtual size_t | write (const Buffer &buffer, const sockaddr_in *peer) |
| |
| size_t | write (const Buffer &buffer) |
| |
| virtual size_t | write (const String &buffer, const sockaddr_in *peer) |
| |
| size_t | write (const String &buffer) |
| |
| virtual bool | readyToRead (std::chrono::milliseconds timeout) |
| |
| virtual bool | readyToWrite (std::chrono::milliseconds timeout) |
| |
| bool | blockingMode () const |
| | Return current blocking mode state. More...
|
| |
SMTP socket.
Sends an e-mail message using SMTP protocol. It uses CSocket class to establish the connection, and CBaseMailConnect to make the complete RFC 822 message.