0
Mail.app에서 전자 메일을 읽고 표시하는 Mac 응용 프로그램을 만들고 싶지만 Mail.app에서 메일을 읽는 방법에 대한 정보를 찾을 수 없습니다. 내 질문 :코코아 : Mail.app에서 메일 읽기
- Mail.app에서 전자 메일을 읽는 방법? 어떤 제안이라도 인정 될 것입니다.
tell application "Mail" set theMessage to message 1 of inbox set theBody to content of theMessage as rich text end tell
실행
NSAppleScript
를 통해 스크립트, 빠른 더러운 예 (등등 오류 처리 등) :NSString *theSource = @"tell application \"Mail\"\n" "set theMessage to message 4 of inbox\n" "set theBody to content of theMessage as rich text\n" "end tell\n" "return theBody"; NSAppleScript* theScript = [[NSAppleScript alloc] initWithSource:theSource]; NSAppleEventDescriptor* theDescriptor = [theScript executeAndReturnError:NULL]; NSLog(@"%@", theDescriptor);
대체 사용
참조 또한 ObjC에서이 작업을 수행하게됩니다 다리, 스크립팅 : 모든 메일을받을 수있는 방법이 http://robnapier.net/blog/scripting-bridge-265 –
이를? '받은 편지함에 모든 메시지에 메시지 설정'과 같은 메시지가 표시됩니다. – NOrder
모든 메시지를 반복하여 내용을 가져올 수 있습니다. 빠른 예가 추가되었습니다. – Anne