21#ifndef G_SMTP_VERIFIER_STATUS_H
22#define G_SMTP_VERIFIER_STATUS_H
30 class VerifierStatus ;
54 G_EXCEPTION( InvalidStatus ,
tx(
"invalid verifier status") ) ;
57 bool temporary =
false ,
58 const std::string & response = {} ,
59 const std::string & reason = {} ) ;
63 const std::string & address = {} ) ;
67 const std::string & full_name ,
const std::string & mbox ) ;
73 std::string
str()
const ;
81 bool is_valid {
false} ;
82 bool is_local {
false} ;
83 bool temporary {
false} ;
85 std::string recipient ;
86 std::string full_name ;
88 std::string response ;
A structure returned by GSmtp::Verifier to describe the status of a 'rcpt-to' or 'vrfy' recipient.
static VerifierStatus local(const std::string &recipient, const std::string &full_name, const std::string &mbox)
Constructor for a valid local mailbox.
std::string str() const
Returns a string representation of the structure.
bool utf8address() const
Returns true if 'address' is utf8 according to GSmtp::ServerParser::mailboxStyle().
static VerifierStatus parse(const std::string &str)
Parses a str() string into a structure.
static VerifierStatus invalid(const std::string &recipient, bool temporary=false, const std::string &response={}, const std::string &reason={})
Factory function for an invalid address.
static VerifierStatus remote(const std::string &recipient, const std::string &address={})
Constructor for a valid remote mailbox.
constexpr const char * tx(const char *p)
A briefer alternative to G::gettext_noop().