Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 110492f5122731329f0db69a1df590c3 > files > 4934

kdepimlibs-apidocs-4.10.5-1.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <title>Email Validation Functions</title>
<style type="text/css">
  .cp-doNotDisplay { display: none; }
  @media aural, braille, handheld, tty { .cp-doNotDisplay { display: inline; speak: normal; }}
  .cp-edit { text-align: right; }
  @media print, embossed { .cp-edit { display: none; }}
</style>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <link rel="meta" href="http://www.kde.org/labels.rdf" type="application/rdf+xml" title="ICRA labels" />
  <meta name="trademark" content="KDE e.V." />
  <meta name="description" content="K Desktop Environment Homepage, KDE.org" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="robots" content="all" />
  <meta name="no-email-collection" content="http://www.unspam.com/noemailcollection" />
  <script type="text/javascript" src="jquery.js"></script>
  <script type="text/javascript" src="dynsections.js"></script>
  <link rel="shortcut icon" href="../../favicon.ico" /><link rel="icon" href="../../favicon.ico" />
  <link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../../kde.css" />
  <link rel="stylesheet" media="print, embossed" type="text/css" href="../../print.css" />
  <link rel="stylesheet" media="screen, aural, handheld, tty, braille" type="text/css" title="Flat" href="../../flat.css" />
  <link rel="stylesheet" type="text/css" href="../../doxygen.css" />
  <link rel="stylesheet" type="text/css" href="../../tabs.css" />
</head>
<body>
<ul class="cp-doNotDisplay">
  <li><a href="#cp-content" accesskey="2">Skip to content</a></li>
  <li><a href="#cp-menu" accesskey="5">Skip to link menu</a></li>
</ul>
<div id="container">
<div id="header">
  <div id="header_top"><div><div>
    <img alt ="" src="../../top-kde.jpg"/>
    </div></div></div>
  <div id="header_bottom">
    <div id="location">
      <ul>
        <li><a href="http://api.kde.org">KDE API Reference</a></li>
        <li><a href="../../index.html">kdepimlibs-4.10.5 API Reference</a></li>
      </ul>
    </div>
    <div id="menu">
<ul>
<li><a href="http://www.kde.org/">KDE Home</a></li>
<li><a href="http://kde.org/contact/">Contact Us</a></li>
</ul>
</div>
</div>
</div>
<!-- End page header -->
    <div id="body_wrapper">
      <div id="body">
        <!-- begin main content -->
        <div id="right">
          <div class="content">
          <div id="main">
            <div class="clearer">&nbsp;</div>
<h2><a name="content"></a>kpimutils</h2>
<!-- BC -->
<div id="top">
<!-- Generated by Doxygen 1.8.3.1 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Email Validation Functions</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga86cd0322770cfdc7df6621fcd32961e4"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">KPIMUtils::EmailParseResult</a> { <br/>
&#160;&#160;<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4a95305ad962cc1d86ff0dbde62afe5b81">KPIMUtils::AddressOk</a>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4a11def90701bc9d6281e8963ecef832fd">KPIMUtils::AddressEmpty</a>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4afb5555bb89278c7b549fbd6a84b62f33">KPIMUtils::UnexpectedEnd</a>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4abf74ed9f2f30ffbcb536c625f77104a8">KPIMUtils::UnbalancedParens</a>, 
<br/>
&#160;&#160;<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4ab9f17af520f125163e4d1eca40a729ac">KPIMUtils::MissingDomainPart</a>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4a505058bb4aed2588cd152f3839c132e7">KPIMUtils::UnclosedAngleAddr</a>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4a19ce4a4bc3f7f085b568a4be8421bae8">KPIMUtils::UnopenedAngleAddr</a>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4a138b5bc9762715535322749f56cc36fe">KPIMUtils::TooManyAts</a>, 
<br/>
&#160;&#160;<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4a5b9f951a82fdf4b14be63bcbdb5c2dcf">KPIMUtils::UnexpectedComma</a>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4a8d5af0f8b775e4d95c1ae2572efba3e4">KPIMUtils::TooFewAts</a>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4a6180ad1383a7668eeef894b1d9cbd716">KPIMUtils::MissingLocalPart</a>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4a218d2d0b1c94a2424a997905ae62fff4">KPIMUtils::UnbalancedQuote</a>, 
<br/>
&#160;&#160;<b>NoAddressSpec</b>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4af4736a216ddffabd6d5c9a62bbb70bf3">KPIMUtils::DisallowedChar</a>, 
<a class="el" href="group__emailvalidation.html#gga86cd0322770cfdc7df6621fcd32961e4a3fa5d2becf8d8979739a8f414144891f">KPIMUtils::InvalidDisplayName</a>
<br/>
 }</td></tr>
<tr class="separator:ga86cd0322770cfdc7df6621fcd32961e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad6cfa61dc8f07d9cca4bd8c895c41b80"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__emailvalidation.html#gad6cfa61dc8f07d9cca4bd8c895c41b80">KPIMUtils::emailParseResultToString</a> (<a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">EmailParseResult</a> errorCode)</td></tr>
<tr class="separator:gad6cfa61dc8f07d9cca4bd8c895c41b80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2d7c3eb0b6470a67f1690ae0e1289c12"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">EmailParseResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__emailvalidation.html#ga2d7c3eb0b6470a67f1690ae0e1289c12">KPIMUtils::isValidAddress</a> (const QString &amp;aStr)</td></tr>
<tr class="separator:ga2d7c3eb0b6470a67f1690ae0e1289c12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab466cffd3d3143cda07263c5efbb8426"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">EmailParseResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__emailvalidation.html#gab466cffd3d3143cda07263c5efbb8426">KPIMUtils::isValidAddressList</a> (const QString &amp;aStr, QString &amp;badAddr)</td></tr>
<tr class="separator:gab466cffd3d3143cda07263c5efbb8426"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf2a1bc99ab8a016c1c782ac574a58de"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__emailvalidation.html#gadf2a1bc99ab8a016c1c782ac574a58de">KPIMUtils::isValidSimpleAddress</a> (const QString &amp;aStr)</td></tr>
<tr class="separator:gadf2a1bc99ab8a016c1c782ac574a58de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaca6ec1f335526bf15c1bff10fad0d339"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__emailvalidation.html#gaca6ec1f335526bf15c1bff10fad0d339">KPIMUtils::simpleEmailAddressErrorMsg</a> ()</td></tr>
<tr class="separator:gaca6ec1f335526bf15c1bff10fad0d339"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2674c9488e2d45c4afb89c98b1af4b36"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">EmailParseResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__emailvalidation.html#ga2674c9488e2d45c4afb89c98b1af4b36">KPIMUtils::splitAddress</a> (const QByteArray &amp;address, QByteArray &amp;displayName, QByteArray &amp;addrSpec, QByteArray &amp;comment)</td></tr>
<tr class="separator:ga2674c9488e2d45c4afb89c98b1af4b36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac58d9ccc074a524e95af72372b507984"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">EmailParseResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__emailvalidation.html#gac58d9ccc074a524e95af72372b507984">KPIMUtils::splitAddress</a> (const QString &amp;address, QString &amp;displayName, QString &amp;addrSpec, QString &amp;comment)</td></tr>
<tr class="separator:gac58d9ccc074a524e95af72372b507984"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac31a849c298710a0d6e363962e3759c3"><td class="memItemLeft" align="right" valign="top">QStringList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__emailvalidation.html#gac31a849c298710a0d6e363962e3759c3">KPIMUtils::splitAddressList</a> (const QString &amp;aStr)</td></tr>
<tr class="separator:gac31a849c298710a0d6e363962e3759c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This collection of methods that can validate email addresses as supplied by the user (typically, user input from a text box). </p>
<p>There are also functions for splitting an RFC2822 address into its component parts. </p>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga86cd0322770cfdc7df6621fcd32961e4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">KPIMUtils::EmailParseResult</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Email validation result. </p>
<p>The only 'success' code in this enumeration is AddressOK; all the other values indicate some specific problem with the address which is being validated.</p>
<p>Result type for <a class="el" href="group__emailvalidation.html#ga2674c9488e2d45c4afb89c98b1af4b36" title="Splits the given address into display name, email address and comment.">splitAddress()</a>, <a class="el" href="group__emailvalidation.html#ga2d7c3eb0b6470a67f1690ae0e1289c12" title="Validates an email address in the form of &quot;Joe User&quot; joe@example.org.">isValidAddress()</a> and <a class="el" href="group__emailvalidation.html#gadf2a1bc99ab8a016c1c782ac574a58de" title="Validates an email address in the form of joe@example.org.">isValidSimpleAddress()</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4a95305ad962cc1d86ff0dbde62afe5b81"></a>AddressOk</em>&nbsp;</td><td class="fielddoc">
<p>Email is valid. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4a11def90701bc9d6281e8963ecef832fd"></a>AddressEmpty</em>&nbsp;</td><td class="fielddoc">
<p>The address is empty. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4afb5555bb89278c7b549fbd6a84b62f33"></a>UnexpectedEnd</em>&nbsp;</td><td class="fielddoc">
<p>Something is unbalanced. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4abf74ed9f2f30ffbcb536c625f77104a8"></a>UnbalancedParens</em>&nbsp;</td><td class="fielddoc">
<p>Unbalanced ( ) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4ab9f17af520f125163e4d1eca40a729ac"></a>MissingDomainPart</em>&nbsp;</td><td class="fielddoc">
<p>No domain in address. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4a505058bb4aed2588cd152f3839c132e7"></a>UnclosedAngleAddr</em>&nbsp;</td><td class="fielddoc">
<p>&lt; with no matching &gt; </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4a19ce4a4bc3f7f085b568a4be8421bae8"></a>UnopenedAngleAddr</em>&nbsp;</td><td class="fielddoc">
<p>&gt; with no preceding &lt; </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4a138b5bc9762715535322749f56cc36fe"></a>TooManyAts</em>&nbsp;</td><td class="fielddoc">
<p>More than one @ in address. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4a5b9f951a82fdf4b14be63bcbdb5c2dcf"></a>UnexpectedComma</em>&nbsp;</td><td class="fielddoc">
<p>Comma not allowed here. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4a8d5af0f8b775e4d95c1ae2572efba3e4"></a>TooFewAts</em>&nbsp;</td><td class="fielddoc">
<p>Missing @ in address. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4a6180ad1383a7668eeef894b1d9cbd716"></a>MissingLocalPart</em>&nbsp;</td><td class="fielddoc">
<p>No address specified, only domain. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4a218d2d0b1c94a2424a997905ae62fff4"></a>UnbalancedQuote</em>&nbsp;</td><td class="fielddoc">
<p>Quotes (single or double) not matched. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4af4736a216ddffabd6d5c9a62bbb70bf3"></a>DisallowedChar</em>&nbsp;</td><td class="fielddoc">
<p>An invalid character detected in address. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga86cd0322770cfdc7df6621fcd32961e4a3fa5d2becf8d8979739a8f414144891f"></a>InvalidDisplayName</em>&nbsp;</td><td class="fielddoc">
<p>An invalid displayname detected in address. </p>
</td></tr>
</table>

<p>Definition at line <a class="el" href="email_8h_source.html#l00063">63</a> of file <a class="el" href="email_8h_source.html">email.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gad6cfa61dc8f07d9cca4bd8c895c41b80"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString KPIMUtils::emailParseResultToString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">EmailParseResult</a>&#160;</td>
          <td class="paramname"><em>errorCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Translate the enum errorcodes from emailParseResult into i18n'd strings that can be used for msg boxes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">errorCode</td><td>an <em>error</em> code returned from one of the email validation functions. Do not pass AddressOk as a value, since that will yield a misleading error message</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>human-readable and already translated message describing the validation error. </dd></dl>

<p>Definition at line <a class="el" href="email_8cpp_source.html#l00529">529</a> of file <a class="el" href="email_8cpp_source.html">email.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ga2d7c3eb0b6470a67f1690ae0e1289c12"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">EmailParseResult</a> KPIMUtils::isValidAddress </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>aStr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Validates an email address in the form of "Joe User" <a href="#" onclick="location.href='mai'+'lto:'+'joe'+'@e'+'xam'+'pl'+'e.o'+'rg'; return false;">joe@e<span style="display: none;">.nosp@m.</span>xamp<span style="display: none;">.nosp@m.</span>le.or<span style="display: none;">.nosp@m.</span>g</a>. </p>
<p>Returns AddressOk if no error was encountered. Otherwise an appropriate error code is returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aStr</td><td>a single email address, example: Joe User (comment1) <a href="#" onclick="location.href='mai'+'lto:'+'joe'+'.u'+'ser'+'@e'+'xam'+'pl'+'e.o'+'rg'; return false;">joe.u<span style="display: none;">.nosp@m.</span>ser@<span style="display: none;">.nosp@m.</span>examp<span style="display: none;">.nosp@m.</span>le.o<span style="display: none;">.nosp@m.</span>rg</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>AddressOk if no error was encountered. Otherwise an appropriate error code is returned. </dd></dl>

<p>Definition at line <a class="el" href="email_8cpp_source.html#l00315">315</a> of file <a class="el" href="email_8cpp_source.html">email.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="gab466cffd3d3143cda07263c5efbb8426"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">KPIMUtils::EmailParseResult</a> KPIMUtils::isValidAddressList </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>aStr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QString &amp;&#160;</td>
          <td class="paramname"><em>badAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Validates a list of email addresses, and also allow aliases and distribution lists to be expanded before validation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aStr</td><td>a string containing a list of email addresses. </td></tr>
    <tr><td class="paramname">badAddr</td><td>a string to hold the address that was faulty.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>AddressOk if no error was encountered. Otherwise an appropriate error code is returned. </dd></dl>

<p>Definition at line <a class="el" href="email_8cpp_source.html#l00507">507</a> of file <a class="el" href="email_8cpp_source.html">email.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="gadf2a1bc99ab8a016c1c782ac574a58de"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KPIMUtils::isValidSimpleAddress </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>aStr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Validates an email address in the form of <a href="#" onclick="location.href='mai'+'lto:'+'joe'+'@e'+'xam'+'pl'+'e.o'+'rg'; return false;">joe@e<span style="display: none;">.nosp@m.</span>xamp<span style="display: none;">.nosp@m.</span>le.or<span style="display: none;">.nosp@m.</span>g</a>. </p>
<p>Returns true if no error was encountered. This method should be used when the input field should not allow a "full" email address with comments and other special cases that normally are valid in an email address.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aStr</td><td>a single email address, example: <a href="#" onclick="location.href='mai'+'lto:'+'joe'+'.u'+'ser'+'@e'+'xam'+'pl'+'e.o'+'rg'; return false;">joe.u<span style="display: none;">.nosp@m.</span>ser@<span style="display: none;">.nosp@m.</span>examp<span style="display: none;">.nosp@m.</span>le.o<span style="display: none;">.nosp@m.</span>rg</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if no error was encountered.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This method differs from calling <a class="el" href="group__emailvalidation.html#ga2d7c3eb0b6470a67f1690ae0e1289c12" title="Validates an email address in the form of &quot;Joe User&quot; joe@example.org.">isValidAddress()</a> and checking that that returns AddressOk in two ways: it is faster, and it does <em>not</em> allow fancy addresses. </dd></dl>

<p>Definition at line <a class="el" href="email_8cpp_source.html#l00587">587</a> of file <a class="el" href="email_8cpp_source.html">email.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="gaca6ec1f335526bf15c1bff10fad0d339"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString KPIMUtils::simpleEmailAddressErrorMsg </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a i18n string to be used in msgboxes. </p>
<p>This allows for error messages to be the same across the board.</p>
<dl class="section return"><dt>Returns</dt><dd>An i18n ready string for use in msgboxes. </dd></dl>

<p>Definition at line <a class="el" href="email_8cpp_source.html#l00644">644</a> of file <a class="el" href="email_8cpp_source.html">email.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ga2674c9488e2d45c4afb89c98b1af4b36"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">EmailParseResult</a> KPIMUtils::splitAddress </td>
          <td>(</td>
          <td class="paramtype">const QByteArray &amp;&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QByteArray &amp;&#160;</td>
          <td class="paramname"><em>displayName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QByteArray &amp;&#160;</td>
          <td class="paramname"><em>addrSpec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QByteArray &amp;&#160;</td>
          <td class="paramname"><em>comment</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Splits the given address into display name, email address and comment. </p>
<p>Returns AddressOk if no error was encountered. Otherwise an appropriate error code is returned. In case of an error the values of displayName, addrSpec and comment are undefined.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>a single email address, example: Joe User (comment1) <a href="#" onclick="location.href='mai'+'lto:'+'joe'+'.u'+'ser'+'@e'+'xam'+'pl'+'e.o'+'rg'; return false;">joe.u<span style="display: none;">.nosp@m.</span>ser@<span style="display: none;">.nosp@m.</span>examp<span style="display: none;">.nosp@m.</span>le.o<span style="display: none;">.nosp@m.</span>rg</a> (comment2) </td></tr>
    <tr><td class="paramname">displayName</td><td>only out: the display-name of the email address, i.e. "Joe User" in the example; in case of an error the return value is undefined </td></tr>
    <tr><td class="paramname">addrSpec</td><td>only out: the addr-spec, i.e. "joe.user@example.org" in the example; in case of an error the return value is undefined </td></tr>
    <tr><td class="paramname">comment</td><td>only out: the space-separated comments, i.e. "comment1 comment2" in the example; in case of an error the return value is undefined</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>AddressOk if no error was encountered. Otherwise an appropriate error code is returned. </dd></dl>

<p>Definition at line <a class="el" href="email_8cpp_source.html#l00286">286</a> of file <a class="el" href="email_8cpp_source.html">email.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="gac58d9ccc074a524e95af72372b507984"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__emailvalidation.html#ga86cd0322770cfdc7df6621fcd32961e4">EmailParseResult</a> KPIMUtils::splitAddress </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QString &amp;&#160;</td>
          <td class="paramname"><em>displayName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QString &amp;&#160;</td>
          <td class="paramname"><em>addrSpec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QString &amp;&#160;</td>
          <td class="paramname"><em>comment</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is an overloaded member function, provided for convenience. </p>
<p>It behaves essentially like the above function.</p>
<p>Splits the given address into display name, email address and comment. Returns AddressOk if no error was encountered. Otherwise an appropriate error code is returned. In case of an error the values of displayName, addrSpec and comment are undefined.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>a single email address, example: Joe User (comment1) <a href="#" onclick="location.href='mai'+'lto:'+'joe'+'.u'+'ser'+'@e'+'xam'+'pl'+'e.o'+'rg'; return false;">joe.u<span style="display: none;">.nosp@m.</span>ser@<span style="display: none;">.nosp@m.</span>examp<span style="display: none;">.nosp@m.</span>le.o<span style="display: none;">.nosp@m.</span>rg</a> (comment2) </td></tr>
    <tr><td class="paramname">displayName</td><td>only out: the display-name of the email address, i.e. "Joe User" in the example; in case of an error the return value is undefined </td></tr>
    <tr><td class="paramname">addrSpec</td><td>only out: the addr-spec, i.e. "joe.user@example.org" in the example; in case of an error the return value is undefined </td></tr>
    <tr><td class="paramname">comment</td><td>only out: the space-separated comments, i.e. "comment1 comment2" in the example; in case of an error the return value is undefined</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>AddressOk if no error was encountered. Otherwise an appropriate error code is returned. </dd></dl>

<p>Definition at line <a class="el" href="email_8cpp_source.html#l00296">296</a> of file <a class="el" href="email_8cpp_source.html">email.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="gac31a849c298710a0d6e363962e3759c3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QStringList KPIMUtils::splitAddressList </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>aStr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Split a comma separated list of email addresses. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aStr</td><td>a single string representing a list of addresses </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a list of strings, where each string is one address from the original list </dd></dl>

<p>Definition at line <a class="el" href="email_8cpp_source.html#l00045">45</a> of file <a class="el" href="email_8cpp_source.html">email.cpp</a>.</p>

</div>
</div>
</div><!-- contents -->
<div class="copyrights">
This file is part of the KDE documentation.<br/>
Documentation copyright &copy; 1996-2013 The KDE developers.<br/>
Generated on Fri Jul 12 2013 16:48:26 by
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.8.3.1 written
by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, &copy;&nbsp;1997-2006
<p>
KDE's <a href="http://techbase.kde.org/Policies/Library_Documentation_Policy">Doxygen guidelines</a> are available online.
</p>
</div>
            </div>
          </div>
        </div>
        <div id="left">
          <div class="menu_box">
<a name="cp-menu" /><div class="menutitle"><div>
<h2 id="cp-menu-project">kpimutils</h2>
<a href="#cp-skip-project" class="cp-doNotDisplay">Skip menu "kpimutils"</a>
</div></div>
<ul><li><a href="index.html">Main Page</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="functions.html">Class Members</a></li><li><a href="files.html">File List</a></li><li><a href="modules.html">Modules</a></li></ul>
<!--
<h2>Class Picker</h2>
<div style="text-align: center;">
<form name="guideform">
<select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<option value="annotated.html">-- Choose --</option>
  <option value="classKPIMUtils_1_1EmailValidator.html">kpimutils::emailvalidator</option>,  <option value="classKPIMUtils_1_1LinkLocator.html">kpimutils::linklocator</option>,  <option value="classKPIMUtils_1_1NetworkAccessHelper.html">kpimutils::networkaccesshelper</option>,
</select>
</form>
</div>
-->
<div class="menu_box">
<a name="cp-menu" /><div class="menutitle"><div>
<h2 id="cp-menu-project">kdepimlibs-4.10.5 API Reference</h2>
<a href="#cp-skip-project" class="cp-doNotDisplay">Skip menu "kdepimlibs-4.10.5 API Reference"</a>
</div></div>
<div class="nav_list">
<ul>
<li><a href="../../akonadi/html/index.html">akonadi</a></li><li>&nbsp;&nbsp;<a href="../../akonadi/contact/html/index.html">contact</a></li><li>&nbsp;&nbsp;<a href="../../akonadi/kmime/html/index.html">kmime</a></li><li>&nbsp;&nbsp;<a href="../../akonadi/socialutils/html/index.html">socialutils</a></li><li><a href="../../kabc/html/index.html">kabc</a></li><li><a href="../../kalarmcal/html/index.html">kalarmcal</a></li><li><a href="../../kblog/html/index.html">kblog</a></li><li><a href="../../kcal/html/index.html">kcal</a></li><li><a href="../../kcalcore/html/index.html">kcalcore</a></li><li><a href="../../kcalutils/html/index.html">kcalutils</a></li><li><a href="../../kholidays/html/index.html">kholidays</a></li><li><a href="../../kimap/html/index.html">kimap</a></li><li><a href="../../kioslave/html/index.html">kioslave</a></li><li>&nbsp;&nbsp;<a href="../../kioslave/imap4/html/index.html">imap4</a></li><li>&nbsp;&nbsp;<a href="../../kioslave/mbox/html/index.html">mbox</a></li><li>&nbsp;&nbsp;<a href="../../kioslave/nntp/html/index.html">nntp</a></li><li><a href="../../kldap/html/index.html">kldap</a></li><li><a href="../../kmbox/html/index.html">kmbox</a></li><li><a href="../../kmime/html/index.html">kmime</a></li><li><a href="../../kontactinterface/html/index.html">kontactinterface</a></li><li><a href="../../kpimidentities/html/index.html">kpimidentities</a></li><li><a href="../../kpimtextedit/html/index.html">kpimtextedit</a></li><li><a href="../../kpimutils/html/index.html">kpimutils</a></li><li><a href="../../kresources/html/index.html">kresources</a></li><li><a href="../../ktnef/html/index.html">ktnef</a></li><li><a href="../../kxmlrpcclient/html/index.html">kxmlrpcclient</a></li><li><a href="../../mailtransport/html/index.html">mailtransport</a></li><li><a href="../../microblog/html/index.html">microblog</a></li><li><a href="../../qgpgme/html/index.html">qgpgme</a></li><li><a href="../../syndication/html/index.html">syndication</a></li><li>&nbsp;&nbsp;<a href="../../syndication/atom/html/index.html">atom</a></li><li>&nbsp;&nbsp;<a href="../../syndication/rdf/html/index.html">rdf</a></li><li>&nbsp;&nbsp;<a href="../../syndication/rss2/html/index.html">rss2</a></li>
</ul></div></div>
<!-- api_searchbox -->
          </div>
        </div>
        <div class="clearer"></div>
      </div>
      <div class="clearer"></div>
    </div>
    <div id="end_body"></div>
    <div id="footer"><div id="footer_text">
    Report problems with this website to <a href="https://bugs.kde.org/enter_sysadmin_request.cgi?component=api.kde.org">our bug tracking system</a>.<br>
    Contact the specific authors with questions and comments about the page contents.<p>
    KDE<sup>&#174;</sup> and <a href="/media/images/kde_gear_black.png">the K Desktop Environment<sup>&#174;</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
        <a href="http://www.kde.org/contact/impressum.php">Legal</a></p>
    </div></div>
  </div>
<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-45abe0e0c3bebc77@kde.org">Block me</a>
WARNING END
-->
</body>
</html>