none
Managing DistributionList with Exchange Web Services (EWS) RRS feed

  • Question

  • Hello,

    I'm trying to program a PHP script wich synchronise Contact and distribution liste with other Users.

    This is the code to create a distribution list with PHP - SOAPClient :

    $item->SavedItemFolderId->DistinguishedFolderId->Id = "contacts";
    
    $member2->Mailbox->MailboxType = "Mailbox";
    $member2->Mailbox->RoutingType = "SMTP";
    $member2->Mailbox->Name = "test.be";
    $member2->Mailbox->EmailAddress = "nom2@test.be";
    
    $liste->Members->Member[0] = $member2;
    
    $liste->Categories->String[0] = "cat1";
    $liste->Categories->String[1] = "cat2";
    $liste->ItemClass = "IPM.DistList";
    $liste->Subject  = "ListeFromCode";
    $liste->DisplayName  = "ListeFromCode";
    $liste->Body = "";
    $liste->Body->BodyType = "Text";
    
    $item->Items->Item[0] = $liste;
    
    print_r($client->client->client->CreateItem($item));

    It create the new distributionlist but it don't insert the contact in it and the name seems to be not displayed in Outlook in field "Full Name".

    I usualy use the XML exemples to build my code. But i can't found any exemple to manage Distributionlist ( add contact, modify , . . . )

    If somebody have XML exemples it should be smart !

    I'm working with Exchange 2007 and Outlook 2007.

    THANKS !!!!! =D

    Thursday, February 9, 2012 3:06 PM

Answers

All replies