0
Gmail API 용 웹 기반 응용 프로그램을 만들어 Javas Script의 특정 전자 메일 주소에서 읽지 않은 모든 전자 메일을 가져올 수있었습니다. 하지만 독립 실행 형 응용 프로그램을 사용해야합니다. VS 2017을 사용하여 VB를 선택했습니다. 연결할 수 있고 인증을 받았지만 레이블을 가져올 수 있지만 필터 매개 변수를 사용하여 읽지 않은 (및 보낸 사람) 부분을 검색 할 수 없습니다.Gmail API에 매개 변수 추가
scope.Add(GmailService.Scope.MailGoogleCom)
Dim credential =GoogleWebAuthorizationBroker.AuthorizeAsync(Secrets, scope, "Client ", CancellationToken.None).Result()
initializer.HttpClientInitializer = credential
initializer.ApplicationName = "Gmail API Quickstart"
Dim service = New GmailService(initializer)
Dim userId As String = "[email protected]"
Dim request As UsersResource.LabelsResource.ListRequest = service.Users.Labels.List("me")
' List labels.
Dim labels As IList(Of Label) = request.Execute().Labels
Console.WriteLine("Labels:")
If labels IsNot Nothing AndAlso labels.Count > 0 Then
For Each labelItem In labels
MsgBox(labelItem.Name)
Next
Else
Console.WriteLine("No labels found.")
End If
나는 적절한 도움이된다. 감사합니다.
이것 좀 봐 -이게 도움이 될 수도, 그것은 C#하지만 적어도 개념을 얻을 수 있습니다. http://www.developerfusion.com/article/4071/how-to-pop3-in-c/ – codeMonger123