In this simple topic, we will focus on how to create Mapi Contact using C# by adhering to specifically defined steps and using the example code. You can add VCF contact using C# involving very simple API calls and this application can be utilized in any of .NET supported environments in operating systems like Windows, macOS, or Linux.
Steps to Create Mapi Contact in C#
- Configure the application by installing Aspose.Email assembly from the NuGet package manager
- Use the MapiContact instance to add the contact information
- Add the user image for added contact
- Save the contact as an MSG file on the disk
- Save the contact as a VCF file on the disk
The aforementioned steps in C# create Mapi Contact on the disk using the simple API interface. We will start by using an instance of the MapiContact class and add the personal information including the name, professional information, email, contact number, date of birth, user fields and image of the contact. Subsequently, the added contact will be saved as an MSG file and a VCF file on the disk.
Code to Add Mapi Contact in C#
The above example create Mapi Contact in C# and saves the information as a VCF or an MSG file on the disk. The added contact information can be used to send the email using different clients like SMTP, POP3 or Exchange server. Moreover, it can also be stored inside a PST file or pushed to an email server.
In this example, we learnt how to create VCF Contact in C# and save it on the disk. If you are looking to add Mapi Calendar in C#, refer to the article on how to add MapiCalendar to PST using C#.