<?xml version="1.0" encoding="utf-8"?>
<savedquery>
  <IsCustomizable>1</IsCustomizable>
  <CanBeDeleted>1</CanBeDeleted>
  <isquickfindquery>0</isquickfindquery>
  <isprivate>0</isprivate>
  <isdefault>0</isdefault>
  <returnedtypecode>4202</returnedtypecode>
  <savedqueryid>{a5c53acd-563d-e611-8120-127b25dcbde7}</savedqueryid>
  <layoutxml>
    <grid name="resultset" object="4202" jump="subject" select="1" preview="1" icon="1">
      <row name="result" id="activityid">
        <cell name="to" width="125" />
        <cell name="from" width="125" disableSorting="1" />
        <cell name="regardingobjectid" width="200" />
        <cell name="subject" width="200" />
        <cell name="statuscode" width="100" />
      </row>
    </grid>
  </layoutxml>
  <querytype>0</querytype>
  <fetchxml>
    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
      <entity name="email">
        <attribute name="to" />
        <attribute name="subject" />
        <attribute name="regardingobjectid" />
        <attribute name="statuscode" />
        <filter type="and">
          <condition attribute="directioncode" operator="eq" value="1" />
          <filter type="or">
            <filter type="and">
              <condition attribute="statuscode" operator="in">
                <value>6</value>
                <value>7</value>
              </condition>
              <condition attribute="statecode" operator="eq" value="1" />
            </filter>
            <filter type="and">
              <condition attribute="statuscode" operator="eq" value="8" />
              <condition attribute="statecode" operator="eq" value="0" />
            </filter>
          </filter>
        </filter>
        <attribute name="from" />
        <attribute name="activityid" />
      </entity>
    </fetch>
  </fetchxml>
  <IntroducedVersion>1.1.0.6</IntroducedVersion>
  <LocalizedNames>
    <LocalizedName description="All Pending Emails" languagecode="1033" />
  </LocalizedNames>
</savedquery>