E-MailRelay
|
A concrete derived class implementing the GSmtp::NewMessage interface. More...
#include <gnewfile.h>
Public Member Functions | |
NewFile (FileStore &store, const std::string &from, const std::string &from_auth_in, const std::string &from_auth_out, std::size_t max_size, bool test_for_eight_bit) | |
Constructor. The FileStore reference is kept. More... | |
~NewFile () override | |
Destructor. More... | |
G::Path | contentPath () const |
Returns the path of the content file. | |
NewFile (const NewFile &)=delete | |
NewFile (NewFile &&)=delete | |
void | operator= (const NewFile &)=delete |
void | operator= (NewFile &&)=delete |
![]() | |
virtual void | addTo (const std::string &to, bool local)=0 |
Adds a 'to' address. | |
virtual bool | addText (const char *, std::size_t)=0 |
Adds a line of content, typically ending with CR-LF. More... | |
virtual bool | prepare (const std::string &session_auth_id, const std::string &peer_socket_address, const std::string &peer_certificate)=0 |
Prepares to store the message in the message store. More... | |
virtual void | commit (bool strict)=0 |
Commits the prepare()d message to the store. More... | |
virtual std::string | location () const =0 |
Returns the message's unique location. | |
virtual MessageId | id () const =0 |
Returns the message's unique identifier. | |
bool | addTextLine (const std::string &) |
A convenience function that calls addText() taking a string parameter and adding CR-LF. More... | |
virtual | ~NewMessage ()=default |
Destructor. More... | |
A concrete derived class implementing the GSmtp::NewMessage interface.
Writes itself to the i/o streams supplied by GSmtp::FileStore.
Definition at line 42 of file gnewfile.h.
GSmtp::NewFile::NewFile | ( | FileStore & | store, |
const std::string & | from, | ||
const std::string & | from_auth_in, | ||
const std::string & | from_auth_out, | ||
std::size_t | max_size, | ||
bool | test_for_eight_bit | ||
) |
Constructor. The FileStore reference is kept.
Definition at line 37 of file gnewfile.cpp.
|
override |
Destructor.
If the new message has not been commit()ed then the files are deleted.
Definition at line 57 of file gnewfile.cpp.