KEmailAddress

KEmailAddress Namespace Reference

Enumerations

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

Functions

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

Since
5.5.0

Function Documentation

◆ decodeMailtoUrl()

QString KEmailAddress::decodeMailtoUrl ( const QUrl & mailtoUrl)

Extracts the mailbox out of the mailto: URL.

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

Definition at line 1115 of file kemailaddress.cpp.

◆ encodeMailtoUrl()

QUrl KEmailAddress::encodeMailtoUrl ( const QString & mailbox)

Creates a valid mailto: URL from the given mailbox.

Parameters
mailboxThe mailbox, which means the display name and the address specification, for example "Thomas McGuire" thoma.nosp@m.s@do.nosp@m.main..nosp@m.com. The display name is optional.
Returns
a valid mailto: URL for the given mailbox.

Definition at line 1106 of file kemailaddress.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:13:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.