KEmailAddress Namespace Reference


enum  EmailParseResult {
  AddressOk, AddressEmpty, UnexpectedEnd, UnbalancedParens,
  MissingDomainPart, UnclosedAngleAddr, UnopenedAngleAddr, TooManyAts,
  UnexpectedComma, TooFewAts, MissingLocalPart, UnbalancedQuote,
  NoAddressSpec, DisallowedChar, InvalidDisplayName, TooFewDots


KCODECS_EXPORT bool compareEmail (const QString &email1, const QString &email2, bool matchName)
KCODECS_EXPORT QString decodeMailtoUrl (const QUrl &mailtoUrl)
KCODECS_EXPORT QString emailParseResultToString (EmailParseResult errorCode)
KCODECS_EXPORT QUrl encodeMailtoUrl (const QString &mailbox)
KCODECS_EXPORT QByteArray extractEmailAddress (const QByteArray &address)
KCODECS_EXPORT QByteArray extractEmailAddress (const QByteArray &address, QString &errorMessage)
KCODECS_EXPORT QString extractEmailAddress (const QString &address)
KCODECS_EXPORT QString extractEmailAddress (const QString &address, QString &errorMessage)
KCODECS_EXPORT bool extractEmailAddressAndName (const QString &aStr, QString &mail, QString &name)
KCODECS_EXPORT QByteArray firstEmailAddress (const QByteArray &addresses)
KCODECS_EXPORT QByteArray firstEmailAddress (const QByteArray &addresses, QString &errorMessage)
KCODECS_EXPORT QString firstEmailAddress (const QString &addresses)
KCODECS_EXPORT QString firstEmailAddress (const QString &addresses, QString &errorMessage)
KCODECS_EXPORT QString fromIdn (const QString &addrSpec)
KCODECS_EXPORT EmailParseResult isValidAddress (const QString &aStr)
KCODECS_EXPORT EmailParseResult isValidAddressList (const QString &aStr, QString &badAddr)
KCODECS_EXPORT bool isValidSimpleAddress (const QString &aStr)
KCODECS_EXPORT QString normalizeAddressesAndDecodeIdn (const QString &addresses)
KCODECS_EXPORT QString normalizeAddressesAndEncodeIdn (const QString &str)
KCODECS_EXPORT QString normalizedAddress (const QString &displayName, const QString &addrSpec, const QString &comment=QString())
KCODECS_EXPORT QString quoteNameIfNecessary (const QString &str)
KCODECS_EXPORT QString simpleEmailAddressErrorMsg ()
KCODECS_EXPORT EmailParseResult splitAddress (const QByteArray &address, QByteArray &displayName, QByteArray &addrSpec, QByteArray &comment)
KCODECS_EXPORT EmailParseResult splitAddress (const QString &address, QString &displayName, QString &addrSpec, QString &comment)
KCODECS_EXPORT QStringList splitAddressList (const QString &aStr)
KCODECS_EXPORT QString toIdn (const QString &addrSpec)

Detailed Description


Function Documentation

◆ decodeMailtoUrl()

KCODECS_EXPORT QString KEmailAddress::decodeMailtoUrl ( const QUrl mailtoUrl)

Extracts the mailbox out of the mailto: URL.

mailtoUrlthe URL with the mailto protocol, which contains the mailbox to be extracted
the mailbox, which means the display name and the address specification.

◆ encodeMailtoUrl()

KCODECS_EXPORT QUrl KEmailAddress::encodeMailtoUrl ( const QString mailbox)

Creates a valid mailto: URL from the given mailbox.

mailboxThe mailbox, which means the display name and the address specification, for example "Thomas McGuire" The display name is optional.
a valid mailto: URL for the given mailbox.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 04:00:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.