Skip to main content

Last updated: 2024-06-07


GetContactsForEmail Method


In this topic:


Overview


The GetContactsForEmail method returns all contacts in SmartOffice who have one or more specified e-mail addresses.


The GetContactsForEmail method is invoked using the method operation.


Parameters


Parameter NameTypeRequired?Description
EmailAddressesStringYesThis parameter accepts one or more e-mail addresses. Use commas to separate multiple addresses.

Example


The following example request retrieves information about all contacts with the e-mail address jackerman@example.com:


XML
<request version='1.0'>
    <header>...</header>
    <method>
        <GetContactsForEmail>
            <EmailAddresses>jackerman@example.com</EmailAddresses>
        </GetContactsForEmail>
    </method>
</request>

The response includes each contact's full name, object ID, contact type, preferred address, preferred phone number, e-mail/web addresses (including preferred e-mail address), employer, occupation, job title and more:


XML
<response version="1.0">
   <header>
      <sessionClosed />
   </header>
   <method>
      <GetContactsForEmail>
         <EZMail _type="obj" />
         <WebAddress _type="obj">
            <Address>jackerman@example.com</Address>
            <Contact _type="obj" id="Contact.1.1">
               <FullName>Joseph Ackerman</FullName>
               <ContactType>1</ContactType>
               <Greeting>Joseph</Greeting>
               <PreferredAddress _type="obj" id="Address.1.1">
                  <Line1>555 Main St.</Line1>
                  <Line2>2nd Floor</Line2>
                  <Line3>Suite 30</Line3>
                  <City>Torrance</City>
                  <State>CA</State>
               </PreferredAddress>
               <PreferredPhone _type="obj" id="Phone.1.1">
                  <PhoneNumber>(123) 555-2312 # 555</PhoneNumber>
               </PreferredPhone>
               <PreferredEmailAddress _type="objs">
                  <WebAddress _type="obj" id="WebAddress.1.1">
                     <Address>jackerman@example.com</Address>
                  </WebAddress>
               </PreferredEmailAddress>
               <WebAddresses _type="objs">
                  <WebAddress _type="obj" id="WebAddress.1.234">
                     <Address>jackerman@example.com</Address>
                  </WebAddress>
                  <WebAddress _type="obj" id="WebAddress.1.235">
                     <Address>jackerman</Address>
                  </WebAddress>
                  <WebAddress _type="obj" id="WebAddress.1.321">
                     <Address>http://jackerman.example.com</Address>
                  </WebAddress>
               </WebAddresses>
            </Contact>
         </WebAddress>
      </GetContactsForEmail>
   </method>
   <_status>OK</_status>
   <_systime>2020-05-28T16:18:30</_systime>
   <!-- Cost 169 mill seconds. -->
</response>