Name Last modified Size DescriptionIn this directory is some sample code I wrote for accessing a Microsoft Exchange Server via Exchange Web Services from ruby.
Parent Directory - default.rb 23-Sep-2009 11:15 376K defaultDriver.rb 23-Sep-2009 11:15 40K defaultMappingRegistry.rb 23-Sep-2009 11:15 534K ews.rb 23-Sep-2009 11:33 2.5K ewslookup.rb 23-Sep-2009 11:15 2.2K
However my problem cropped up while I was flying back from Michigan on Airtran using the in-flight wireless. I was checking and sending email but the connection kept dropping and my VPN connection kept dying.
We don't have LDAP exposed to the internet so I couldn't just stay off the VPN since I needed to lookup addresses. That's where this comes in.
I needed to be able to perform lookups for email addresses while not on the VPN.
./ews.rb -g gowill perform a lookup against the GAL and return and Contact, Mailbox or Distribution List that matches.
[["Bob Gold", "email@example.com", "Mailbox"], ["googleusers", "firstname.lastname@example.org", "PublicDL"], ["Golden Ticket Foods", "email@example.com", "Contact"]]
./ews.rb -l firstname.lastname@example.org ./ews.rb -l googleusersWill return a list of members in that Distribution List. The EWS call for distribution lists behaves differently than the lookup call. You MUST type the exact name or SMTP address associated with the DL.
[["Jack Smith", "email@example.com"], ["Bob Gold", "firstname.lastname@example.org"], ["Frank White", "email@example.com"]]
if no results are found for the expandDL call: perform a resolveNames call for the lookup passed and get any PublicDL results that match redo the expandDL call with the proper name/email address else "No results found" for real this time