Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 1.21 KB

README.md

File metadata and controls

14 lines (11 loc) · 1.21 KB

Introduction

This is a sample .NET Framework 4.8 WinForms app to demonstrate how to wire-up non-SMTP email with Office365. Microsoft has examples for WPF and UWP, but not WinForms, hence the creation of this small app. I've created it, too, to show that it's possible to use an older .NET Framework 4.8 with Microsoft Graph.

How to Set Up

  1. Register application with Azure
  2. Set the permissions in Azure to the desire scopes. In this case, you'll need to add "Mail.Send" and "Mail.ReadWrite" for Microsoft Graph to allow proper permissions for sending emails and attachments. Scopes will also need to be specified in the application itself (~line 29 in MailInfo.cs in the sample)
  3. Use the ClientId and TenantId from app registration on Azure in local application (Program.cs)
  4. Restore packages

Additional Informational and Documentation Links