I would like to build a tool which analyses someone's emails.
Is it possible on iOS or OS X to build something which gets access to emails?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
Yes it is possible to get access to a user's e-mails. This assumes the e-mails are stored on a server and the user gives you access. This will be the case for those using IMAP based e-mail accounts and for those using GMail.
You will not easily be able to access e-mails uniquely stored within Mail.app's stores. See How can I access emails in Apple Mail programmatically?