How To Get all ITEMS from Folders and Sub-folders of PublicFolders Using EWS Managed API

To get all folders use the code below: public void GetAllFolders(ExchangeService service, List<Folder> completeListOfFolderIds) { FolderView folderView = new FolderView(int.MaxValue); FindFoldersResults findFolderResults = service.FindFolders(WellKnownFolderName.PublicFoldersRoot, folderView); foreach (Folder folder in findFolderResults) { completeListOfFolderIds.Add(folder); FindAllSubFolders(service, folder.Id, completeListOfFolderIds); } } private void FindAllSubFolders(ExchangeService service, FolderId parentFolderId, List<Folder> completeListOfFolderIds) { //search for sub folders FolderView folderView = new FolderView(int.MaxValue); … Read more

Sending email using JSP

Well offhand I would say there is an authentication issue when trying to connect. You are not providing any username or password, unless your exchange server doesn’t require username and password. UPDATE: If using JDK 7 see the following post, it resolved this issue: Defect – JDK7 Permission Denied with Sockets when using VPN “More … Read more

Access exchange e-mail in C#

If you use Exchange 2007 and have web services enabled, this is pretty easy. I added a 2.0-style classic Web Reference to my VS2008 project, and I can get mail messages like this: // exchange 2007 lets us use web services to check mailboxes. using (ExchangeServiceBinding exchangeServer = new ExchangeServiceBinding()) { ICredentials creds = new … Read more

Powershell with exchange– How do I append all verbose output to a file

This article is completely revised 2017-07-18 as the new Log-Entry solution replaces the former Write-Log solution which will not be further updated. See also: Migrating from Write-Log. In general, I find that logging is underestimated for Microsoft scripting languages. Not only at design time of a script (or cmdlet) logging comes in handy but when … Read more

How remove accents in PowerShell?

As per ip.’s answer, here is the Powershell version. function Remove-Diacritics { param ([String]$src = [String]::Empty) $normalized = $src.Normalize( [Text.NormalizationForm]::FormD ) $sb = new-object Text.StringBuilder $normalized.ToCharArray() | % { if( [Globalization.CharUnicodeInfo]::GetUnicodeCategory($_) -ne [Globalization.UnicodeCategory]::NonSpacingMark) { [void]$sb.Append($_) } } $sb.ToString() } # Test data @(“Rhône”, “Basíl”, “Åbo”, “”, “Gräsäntörmä”) | % { Remove-Diacritics $_ } Output: Rhone … Read more