21#ifndef G_SMTP_VERIFIER_STATUS_H
22#define G_SMTP_VERIFIER_STATUS_H
31 class VerifierStatus ;
55 G_EXCEPTION( InvalidStatus ,
tx(
"invalid verifier status") )
58 bool temporary =
false ,
59 const std::string & response = {} ,
60 const std::string & reason = {} ) ;
64 const std::string & address = {} ) ;
68 const std::string & full_name ,
const std::string & mbox ) ;
74 std::string
str()
const ;
78 bool is_valid {
false} ;
79 bool is_local {
false} ;
80 bool temporary {
false} ;
82 std::string recipient ;
83 std::string full_name ;
85 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.
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) noexcept
A briefer alternative to G::gettext_noop().