Table of Contents
In this article, We learn how to create get access token for azure management API. I will show how to do it, and just follow the steps clearly.
For more updates please do Subscribe via Email:
Using C#, you are able to compose email and save in your draft in outlook mail box.
First create a project in your visual studio. After creating the project proceed to Dependencies or references.
And right click and hit the Add Project Reference..
- In reference manager, Select COM tab.
- Find the Microsoft Outlook 16.0 Object Library.
- Hit OK button.
Here the library is being imported in your project.
This is the full source of code to compose and save the mail draft in your outlook mail account.
public async Task composeEmailSaveDraft_COM()
{
Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook._NameSpace ns = null;
//Microsoft.Office.Interop.Outlook.Account smtpAddress = null;
Microsoft.Office.Interop.Outlook.MAPIFolder draftsFolder = null;
ns = app.GetNamespace("MAPI");
draftsFolder = ns.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderDrafts);
Microsoft.Office.Interop.Outlook.MailItem email = draftsFolder.Items.Add("IPM.NOTE");
email.Subject = "Testing in C#";
email.HTMLBody = "Test draft email";
email.Recipients.Add("recipientEmails@mail.com");
email.Recipients.ResolveAll();
email.UnRead = true;
email.Save();
}
Happy Learning..
Thank you for visiting my blog site. Hoping you learn more here. please feel free to comment and suggest if there is need to enhance and update. thank you.
Related Topics
How to compose email and save email draft in outlook using C#
How to compose email and save email draft in outlook using C# […]
How to convert base64 string format of excel file into DataTable form of data type using C#
In this article, We learn how to convert base64 string format of excel file into Data Table form of data type using C#. I will […]
How to convert data from Aspose.Cells.Worksheet to DataTable using C#
How to conversion of data from Aspose.Cells.Worksheet to DataTable using C# […]
How to use Stored Procedure using Entity Framework in .Net Core
In this article, We can learn how to consume Stored Procedure (SP) using Entity Framework in .Net Core. I will show you how to do […]
Angular CRUD with .NET Core API
In this article, We create a full tutorial of Angular CRUD with .NET Core API. I will show how to do it, and just follow […]
.NET Core API using Entity Framework (EF) Code First Approach
In this article, I will show how to create .NET Core API using Entity Framework Code First Approach. I will develop Student Web API application […]
Create Project in ASP.Net Core WebApp
In this tutorial, I just want to show step by step and explained on how to create project in ASP.net Core Web Application (MVC). So […]
Create a new project in ASP.net Web Application (MVC)
In this tutorial, I just want to show step by step and explained on how to create project in ASP.net Web Application (MVC). So that […]
ASP.Net CRUD using Entity Framework
In this tutorial, I create a project in ASP.net CRUD Web Application using Entity Framework. This Project user can Create, Read(Display), Update, Delete data from Database using […]
Use Report Viewer in ASP.NET Web Application (.NET Framework) Using C#
In this tutorial, I create a project in ASP.net Web Application and make report using Report Viewer control and RDLC file. This Project user can Print, export […]
ASP.NET Web Application (.NET Framework) – Login and Registration using SQL Server
In this tutorial, I create a project in ASP.net Web Application using SQL Server. This Project have an user login and registration. I will use […]
Using Thread in C#
C# (C-Sharp) is a programming language developed by Microsoft that runs on the .NET Framework. And widely used for developing desktop application, web application and […]
Get List of Printer Name installed in your PC’s (C Sharp)
C# (C-Sharp) is a programming language developed by Microsoft that runs on the .NET Framework. And used to develop web application, desktop application, mobile application, […]
Microsoft.Jet.OLEDB.4.0′ provider is not registered on the local machine
I created a windows application developed in .NET 3.5 using MS Access local database. and I found a solution for this problem. The issue I […]
How to connect MySql Database using C#
Step by steps Create Database in MySql. create database ConnectCsharpToMysql Paste this command in your phpMyAdmin and after click Go to Run the command. Done […]
Add Checkbox in Datagridview C#
Add Checkbox in Datagridview C# […]
Add Button in DatagridView C#
Declare Data table in global;Datatable hold temporary data; DataTable dt = new DataTable(); create column to datatable "dt". dt.Columns.Add("id"); dt.Columns.Add("name"); Create temporary data and stored […]
LinQ Tutorial on DataTable – C#
LinQ Tutorial – This LINQ tutorial will show you some basic codes on implementing LINQ in C#.LINQ is an acronym for Language Integrated Query, which is […]