7#ifndef BOTAN_EMAIL_ADDRESS_H_
8#define BOTAN_EMAIL_ADDRESS_H_
10#include <botan/dns_name.h>
11#include <botan/types.h>
40 static std::optional<EmailAddress>
from_string(std::string_view addr);
43 const std::string&
local_part()
const {
return m_local_part; }
71 std::string m_local_part;
93 static std::optional<SmtpUtf8Mailbox>
from_string(std::string_view addr);
96 const std::string&
local_part()
const {
return m_local_part; }
123 std::string m_local_part;
#define BOTAN_PUBLIC_API(maj, min)
const DNSName & domain() const
const std::string & local_part() const
The local-part, ASCII only.
auto operator<=>(const EmailAddress &) const =default
static std::optional< EmailAddress > from_string(std::string_view addr)
bool operator==(const EmailAddress &) const =default
const std::string & local_part() const
The local-part, UTF-8 encoded, should contain non-ASCII.
static std::optional< SmtpUtf8Mailbox > from_string(std::string_view addr)
bool operator==(const SmtpUtf8Mailbox &) const =default
auto operator<=>(const SmtpUtf8Mailbox &) const =default
const DNSName & domain() const
The domain, as an LDH host name in A-label form (RFC 9598 Section 3).
std::string to_string(ErrorType type)
Convert an ErrorType to string.