Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Exchange server GAL entry parameters

by cole3rd (Initiate)
on Jan 26, 2012 at 22:01 UTC ( #950226=perlquestion: print w/ replies, xml ) Need Help??
cole3rd has asked for the wisdom of the Perl Monks concerning the following question:

How do you obtain user email information, like email1address under the Global Address List on the Windows Exchange server. No matter what I try, I only get the user name. My code so far:

use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; my $Outlook = Win32::OLE->GetActiveObject('Outlook.Application') or di +e "GetActiveObject failed\n"; my $namespace = $Outlook->GetNamespace("MAPI"); my $GAL = $namespace->AddressLists("Global Address List")->{AddressEnt +ries}; my $Filter = $GAL->Filter(); my $list_name = "addr_ent"; # set it to real name $Filter->{Name} = $list_name; my $Folder = $namespace->GetDefaultFolder(olFolderContacts); my $DL = $GAL->GetFirst(); # Depends on match above my $Members = $DL->{Members}; for ( my $Member = $Members->GetFirst();$Member != undef; $Member = $M +embers->GetNext() ) { my $fname = $Member->{FullName}; my $email = $Member->{Email1Address}; print "$fname $email\n"; }
Thanks...

Comment on Exchange server GAL entry parameters
Download Code
Re: Exchange server GAL entry parameters
by Anonymous Monk on Jan 27, 2012 at 09:17 UTC

    No matter what I try, I only get the user name

    What docs are you reading?

      Mostly examples from the Internet, Perlmonks, etc.; there are dozens of examples reading all the user profile parameters from the contact folders, not any examples of reading user profile parameters from entries under the GAL... Thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://950226]
Approved by Eliya
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2014-09-16 16:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (36 votes), past polls