Note: This repo is archived and no longer actively maintained. Security vulnerabilities may exist in the project, or its dependencies. If you plan to reuse or run any code from this repo, be sure to perform appropriate security checks on the code or dependencies first. Do not use this project as the starting point of a production Office Add-in. Always start your production code by using the Office/SharePoint development workload in Visual Studio, or the Yeoman generator for Office Add-ins, and follow security best practices as you develop the add-in.
This sample demonstrates how to use the Outlook Mail API to get emails and attachments from Office 365. It's built for iOS, Android, Web (Angular web app), and Windows Phone. Check out our article on Medium.
The Art Curator sample provides a different way to view your inbox. Imagine you own a company that sells artistic t-shirts. As the owner of the company, you receive lots of emails from artists with designs they want you to buy. Currently, you use your email client to open each message and attachment. Instead, you can use the Art Curator sample to give you an attachment-first view of your inbox so that you can pick and choose designs you like.
This sample demonstrates the following operations from the Outlook Services Mail API:
- Get folders
- Get messages (including filtering and using select)
- Get attachments
- Update messages
- Create and send messages (with and without an attachment)
- Android Studio ver. 1.0+
- An Office 365 account. You can sign up for an Office 365 Developer subscription that includes the resources to start building Office 365 apps.
Note
You will also need to ensure your Azure subscription is bound to your Office 365 tenant. Check out the Active Directory team's blog post, Creating and Managing Multiple Windows Azure Active Directories for instructions. In this post, the Adding a new directory section will explain how to do this. You can also read Set up Azure Active Directory access for your Developer Site for more information.
- Clone this repository
- Open Android Studio
- Import project (Eclipse ADT, Gradle, etc.) > select the target project's
settings.gradle
- Import project (Eclipse ADT, Gradle, etc.) > select the target project's
This app contains pre-registered application information on Azure with Send mail as a user and Read and write user mail permissions.
App information is defined in com.microsoft.artcurator.conf.ServiceConstants
.
public static final String CLIENT_ID = "1feaa784-0130-48d9-adeb-776fc65888c5";
public static final String REDIRECT_URI = "https://useonlytoruntheartcuratorsample/";
For your own app, register your native client application on Azure.
Specify the redirect URI when you register your application. Next, get the client id from the CONFIGURE page. The application must have the Send mail as a user and Read and write user mail permissions.
For more information, see O365-Android-Connect sample Limitations
- File support beyond
.png
and.jpg
- Handling a single email with multiple attachments
- Paging (getting more than 50 emails)
- Handling folder name uniqueness
- Submission folder must be a top-level folder
- If you have any trouble running this sample, please log and issue
- For general questions about the Office 365 APIs, post to Stack Overflow. Make sure that your questions or comments are tagged with [Office365] and [outlook-restapi]
- Get started with Office 365 APIs in apps
- Office Dev Center (Android)
- Office 365 APIs platform overview
- Art Curator for iOS
- Art Curator for Windows Phone
- Art Curator for Web (Angular web app)
Copyright (c) 2015 Microsoft. All rights reserved.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.