すべてをoffice365に移行した後、特定の共有メールボックスに送信されたメールを読み取るアプリケーションが失敗しました。Exchangeオフィスに接続する365、共有メールボックス
これを修正する方法がわかりません。移行前に正常に機能しました。
は、その時の私の資格情報は以下の通りであった。
exchangeService.Credentials =新WebCredentials( "ユーザー"、 "PW"、 "windowsdomain") exchangeService.AutodiscoverUrl( "[email protected]")
、私が使っていたURI: 「
exchangeService.Url = exchangeService.Url =新U ri( "https://owa.DOMAIN.com/ews/exchange.asmx")
と交換所Exchange2010_SP2。
しかし、私はコードを正しく更新したとは思うが、移行後には機能しませんでした(明らかに私はそうではありませんでした)。
私がしようとしているコードは、このです:(これは動作しません)
Sub GetEmails()
Dim exchangeService As New ExchangeService(ExchangeVersion.Exchange2013)
'WebService Uri
'Try
exchangeService.Url = New Uri("https://outlook.office365.com/ews/exchange.asmx")
exchangeService.Credentials = New WebCredentials("[email protected]", "PW")
exchangeService.AutodiscoverUrl("[email protected]")
Dim findResults As FindItemsResults(Of Item) = exchangeService.FindItems(WellKnownFolderName.Inbox, New ItemView(10))
For Each item As Item In findResults.Items
Dim strID As String
'Get mail ID
strID = item.Id.ToString
'Get Lid from mail subject
strLid2 = item.Subject.ToString
strLid2 = UCase(strLid2.Substring(strLid2.Length - 8))
'Get attachements
Call GetAttachmentsFromEmail(exchangeService, strID)
'Move email
Call MoveEmail(exchangeService, strID)
'Upload files to case
Call GetFiles()
Next
End Sub
私は誰かが私を助けるか、正しい方向に私を指すことを願って、私は、この課題を克服することができます。
Brで VG
それはまだ動作していないようです、私はこれにそれを変更:(項目の)FindItemsResultsとして 薄暗いfindResults = exchangeService.FindItems(WellKnownFolderName.Inbox、 "[email protected]"、新ItemView(10)) For items in findResults.Items String strID As String – Vildgut
FolderIdクラスを使用していないが、セキュリティ資格情報のメールボックスに常に接続するものを使用しています。 –
Thankyou Glen、これは今のところ魅力的です。私はあなたが言ったようにfolderIdクラスを使用しなければなりませんでした。 – Vildgut