Skip to content

Outlook Mail Add in. Utilizes native JS, C# using ASP.NET MVC Framework

License

Notifications You must be signed in to change notification settings

Jeffrey-Keyser/DirectSupplyAddIn

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Outlook Web App (OWA) Add-in

Setup Document
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

Product Name Screen Shot

This is a Outlook Web App (OWA) Add-in designed during my internship at Direct Supply! The ultimate goal of this project is to create an add-in that can maximize a user's mailbox space through the deletion of attachments and unnecessary email threads.

Currently the add-in can:

  • Login users to Outlook accounts and leverage Microsoft Graph / Google APIs.
  • Delete duplicate emails in conversations threads.
  • Save attachments to OneDrive / Google Drive, delete from email, and embed a hyperlink to attachment location in email.
    • Can do the above save, delete, and embed on an entire mail folder (Inbox).
    • All with the single click of a button! 😄

A list of commonly used resources that I find helpful are listed in the acknowledgements.

Built With

This section lists the major frameworks that my project uses.

Prerequisites

Before getting started there are a few requirements you must ensure are fulfilled before beginning.

You should have:

  • Visual Studio 2019
  • Access to Office 365 tenant or Outlook.com account that can use Azure Active Directory admin center for registering the app.
    • Failure to use a developer account will result in Graph API call not working and in a MailboxNotEnabledForRESTAPI error
    • See Overview for REST APIs for more details.
  • Patience 😤

Getting Started

Alright, time to begin

  1. First you will need to register the application in the Microsoft Application Registration Portal in order to obtain an app ID for accessing the Microsoft Graph API.

    1. Log in with the identity of an administrator of your Office 365 tenancy to ensure that you are working in an Azure Active Directory that is associated with that tenancy . See Register an application with the Microsoft Identity Platform
    2. There click the Go to app list button and then the Add an app button. Enter a name for the application and click Create application.
    3. Locate the Application Secrets section, and click Generate New Password. A dialog box will appear with the generated password. Copy this value and save it somewhere secure. After leaving this page, you will no longer be able to access this password.
    4. Locate the Platforms section, and click Add Platform. Choose Web, then enter 'https://localhost:44301/AzureADAuth/Authorize' under Redirect URIs.

    Note: The port number in the redirect URI (44301) may be different on your development machine. You can find the correct port number for your machine by selecting the Outlook-Add-in-Microsoft-GraphASPNETWeb project in Solution Explorer, then looking at the SSL URL setting under Development Server in the properties window. Verify that SSL Enabled is True.

    1. Locate the Microsoft Graph Permissions section in the app registration. Next to Delegated Permissions, click Add. Select Files.ReadWrite.All, Mail.ReadWrite, User.Read. Next to Application Permissions grant the following: email, Mail.ReadWrite, offline_access, openid, and profile.
  2. Ensure the following settings are used:

  • SUPPORTED ACCOUNT TYPES: "Accounts in this organizational directory only"
  • IMPLICIT GRANT: Do not enable any Implicit Grant options

Here's an example of what the page should look like when your done.

The completed app registration

Edit Web.config and replace 'YOUR APP ID HERE' with the application ID and 'YOUR APP PASSWORD HERE' with the application secret you generated at the beginning. Also replace 'YOUR TENANT ID HERE' with the directory tenant ID found on the app registration site.

Optional - For Configuring Google Drive Saving

Follow steps (1-4) found Here. Ignore step 3c.

Run the solution

  1. Open the Visual Studio solution file.

  2. Right-click Outlook-Add-in-Microsoft-Graph-ASPNET solution in Solution Explorer (not the project nodes), and then choose Set startup projects. Select the Multiple startup projects radio button. Make sure the project that ends with "Web" is listed first.

  3. On the Build menu, select Clean Solution. When it finishes, open the Build menu again and select Build Solution.

  4. In Solution Explorer, select the Outlook-Add-in-Microsoft-Graph-ASPNET project node (not the top solution node and not the project whose name ends in "Web").

  5. Press F5. The first time you do this, you will be prompted to specify the email and password of the user that you will use for debugging the add-in. Use the credentials of an admin for your O365 tenancy.

    NOTE: The browser will open to the login page for Office on the web. (So, if this is the first time you have run the add-in, you will enter the username and password twice.)

The remaining steps depend on whether you are running the add-in in desktop Outlook or Outlook on the web.

Run the solution with Outlook on the web

  1. Outlook for Web will open in a browser window. In Outlook, click on any email.

  2. On the right when you click the ... button on this tool bar the following icon should appear.

    Icon for Insert Files Add-in

  3. Click the icon to open the task pane add-in.

Run the project with desktop Outlook

TODO:

Installation

Usage

Here is a walkthrough of what the app looks like currently.

1.) Load email via VS

Find app

2.) Click on the ... button on the right of an email for this menu to appear.

Find app2

3.) After clicking the Direct Supply icon, the add-in show look like this. Sign in with your email account.

Open_app

4.) After signing in, the menu should look like this. Now you can click on the commands to get started!

Signin_app

For more examples, please refer to the Documentation

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Jeffrey Keyser - jeff.keyser@outlook.com

Project Link: Direct Supply Add-in

Acknowledgements

About

Outlook Mail Add in. Utilizes native JS, C# using ASP.NET MVC Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages