|
Botan 3.13.0
Crypto and TLS for C&
|
#include <email.h>
Public Member Functions | |
| const DNSName & | domain () const |
| The domain, as an LDH host name in A-label form (RFC 9598 Section 3). | |
| const std::string & | local_part () const |
| The local-part, UTF-8 encoded, should contain non-ASCII. | |
| auto | operator<=> (const SmtpUtf8Mailbox &) const =default |
| bool | operator== (const SmtpUtf8Mailbox &) const =default |
| std::string | to_string () const |
Static Public Member Functions | |
| static std::optional< SmtpUtf8Mailbox > | from_string (std::string_view addr) |
A parsed internationalized mailbox (SmtpUTF8Mailbox) as defined by RFC 9598.
The mailbox is local-part "@" domain, where local-part is a UTF-8 string. The RFC specifically requires that this name only be used when the local-part of the name is not representable in ASCII.
Prior specifications of this name (RFC 8398) allowed for any internationalized domains be stored as U-label names. However RFC 9598 changes this so that only A-label names are allowed. This restriction is enforced by this type.
|
inline |
The domain, as an LDH host name in A-label form (RFC 9598 Section 3).
Definition at line 99 of file email.h.
Referenced by Botan::GeneralName::matches_email(), and operator==().
|
static |
Parse an SmtpUTF8Mailbox
| addr | the address to parse |
Definition at line 99 of file email.cpp.
Referenced by Botan::AlternativeName::decode_from().
|
inline |
The local-part, UTF-8 encoded, should contain non-ASCII.
Definition at line 96 of file email.h.
Referenced by operator==().
|
default |
Order two mailboxes
|
default |
Compare two mailboxes
References domain(), and local_part().
| std::string Botan::SmtpUtf8Mailbox::to_string | ( | ) | const |
Format the mailbox as "local-part@domain"
Definition at line 94 of file email.cpp.
References Botan::fmt().