E-MailRelay

Static Public Member Functions | Public Attributes | List of all members
GSmtp::Envelope Class Reference

A structure containing the contents of an envelope file, with support for file reading, writing and copying. More...

`#include <genvelope.h>`

## Static Public Member Functions
static void | read (std::istream &, Envelope &)
| Reads an envelope from a stream. More...
static std::size_t | write (std::ostream &, const Envelope &)
| Writes an envelope to a stream. More...
static void | copy (std::istream &, std::ostream &)
| A convenience function to copy lines from an input stream to an output stream. More...

## Public Attributes
bool | m_crlf {true}
int | m_eight_bit {-1}
std::string | m_from
G::StringArray | m_to_local
G::StringArray | m_to_remote
std::string | m_authentication
std::string | m_client_socket_address
std::string | m_client_certificate
std::string | m_from_auth_in
std::string | m_from_auth_out
std::size_t | m_endpos {0U}

## Detailed Description

A structure containing the contents of an envelope file, with support for file reading, writing and copying.

Definition at line 38 of file genvelope.h.

## Member Function Documentation

## ◆ copy()

void GSmtp::Envelope::copy | ( | std::istream & | in,
|  | std::ostream & | out
| ) |  |
| static

A convenience function to copy lines from an input stream to an output stream.

Input lines can be newline delimited, but output is always CR-LF. Throws on input error; output errors are not checked.

Definition at line 84 of file genvelope.cpp.

## ◆ read()

void GSmtp::Envelope::read | ( | std::istream & | stream,
|  | GSmtp::Envelope & | e
| ) |  |
| static

Reads an envelope from a stream.

Throws on error. Input lines can be newline delimited, in which case 'm_crlf' is set false.

Definition at line 102 of file genvelope.cpp.

## ◆ write()

std::size_t GSmtp::Envelope::write | ( | std::ostream & | stream,
|  | const Envelope & | e
| ) |  |
| static

Writes an envelope to a stream.

Returns the new endpos value. Returns zero on error. Output lines are CR-LF delimited. The structure 'm_crlf' and 'm_endpos' fields should normally be updated after using write().

Definition at line 50 of file genvelope.cpp.

## Member Data Documentation

## ◆ m_authentication

std::string GSmtp::Envelope::m_authentication

Definition at line 67 of file genvelope.h.

## ◆ m_client_certificate

std::string GSmtp::Envelope::m_client_certificate

Definition at line 69 of file genvelope.h.

## ◆ m_client_socket_address

std::string GSmtp::Envelope::m_client_socket_address

Definition at line 68 of file genvelope.h.

## ◆ m_crlf

bool GSmtp::Envelope::m_crlf {true}

Definition at line 62 of file genvelope.h.

## ◆ m_eight_bit

int GSmtp::Envelope::m_eight_bit {-1}

Definition at line 63 of file genvelope.h.

## ◆ m_endpos

std::size_t GSmtp::Envelope::m_endpos {0U}

Definition at line 72 of file genvelope.h.

## ◆ m_from

std::string GSmtp::Envelope::m_from

Definition at line 64 of file genvelope.h.

## ◆ m_from_auth_in

std::string GSmtp::Envelope::m_from_auth_in

Definition at line 70 of file genvelope.h.

## ◆ m_from_auth_out

std::string GSmtp::Envelope::m_from_auth_out

Definition at line 71 of file genvelope.h.

## ◆ m_to_local

G::StringArray GSmtp::Envelope::m_to_local

Definition at line 65 of file genvelope.h.

## ◆ m_to_remote

G::StringArray GSmtp::Envelope::m_to_remote

Definition at line 66 of file genvelope.h.

The documentation for this class was generated from the following files:

- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gsmtp/genvelope.h
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gsmtp/genvelope.cpp