E-MailRelay
|
A structure returned by GSmtp::Verifier to describe the status of a 'rcpt-to' or 'vrfy' recipient. More...
#include <gverifierstatus.h>
Public Member Functions | |
std::string | str () const |
Returns a string representation of the structure. More... | |
Static Public Member Functions | |
static VerifierStatus | invalid (const std::string &recipient, bool temporary=false, const std::string &response={}, const std::string &reason={}) |
Factory function for an invalid address. More... | |
static VerifierStatus | remote (const std::string &recipient, const std::string &address={}) |
Constructor for a valid remote mailbox. More... | |
static VerifierStatus | local (const std::string &recipient, const std::string &full_name, const std::string &mbox) |
Constructor for a valid local mailbox. More... | |
static VerifierStatus | parse (const std::string &str) |
Parses a str() string into a structure. More... | |
Public Attributes | |
bool | is_valid {false} |
bool | is_local {false} |
bool | temporary {false} |
bool | abort {false} |
std::string | recipient |
std::string | full_name |
std::string | address |
std::string | response |
std::string | reason |
A structure returned by GSmtp::Verifier to describe the status of a 'rcpt-to' or 'vrfy' recipient.
If describing an invalid recipient then 'is_valid' is set false and a 'response' is supplied. The response is typically reported back to the submitter, so it should not contain too much detail.
The 'reason' string can be added to give more context in the log in addition to 'response'.
If a valid local recipient then 'is_local' is set true, 'full_name' is set to the full description of the mailbox and 'address' is set to the recipient's mailbox name (which should not have an at sign).
If a valid remote recipient then 'is_local' is set false, 'full_name' is empty, and 'address' is the verified form of the original recipient.
Definition at line 52 of file gverifierstatus.h.
|
static |
Factory function for an invalid address.
Definition at line 31 of file gverifierstatus.cpp.
|
static |
Constructor for a valid local mailbox.
Definition at line 54 of file gverifierstatus.cpp.
|
static |
Parses a str() string into a structure.
Definition at line 66 of file gverifierstatus.cpp.
|
static |
Constructor for a valid remote mailbox.
Definition at line 43 of file gverifierstatus.cpp.
std::string GSmtp::VerifierStatus::str | ( | ) | const |
Returns a string representation of the structure.
Definition at line 95 of file gverifierstatus.cpp.
bool GSmtp::VerifierStatus::abort {false} |
Definition at line 81 of file gverifierstatus.h.
std::string GSmtp::VerifierStatus::address |
Definition at line 84 of file gverifierstatus.h.
std::string GSmtp::VerifierStatus::full_name |
Definition at line 83 of file gverifierstatus.h.
bool GSmtp::VerifierStatus::is_local {false} |
Definition at line 79 of file gverifierstatus.h.
bool GSmtp::VerifierStatus::is_valid {false} |
Definition at line 78 of file gverifierstatus.h.
std::string GSmtp::VerifierStatus::reason |
Definition at line 86 of file gverifierstatus.h.
std::string GSmtp::VerifierStatus::recipient |
Definition at line 82 of file gverifierstatus.h.
std::string GSmtp::VerifierStatus::response |
Definition at line 85 of file gverifierstatus.h.
bool GSmtp::VerifierStatus::temporary {false} |
Definition at line 80 of file gverifierstatus.h.