![photo1598039375783ecb148c3dd86 | Embarcadero RAD Studio Delphi C++Builder Blogs](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/09/photo-1598039375783-ecb148c3dd86-1.jpg?resize=1140%2C675&ssl=1)
Embarcadero Tech Partner WINSOFT provides an easy to use MAPI suite for Delphi.
What makes MAPI hard?
MAPI is hard. There is lack of clear and consistent coding, different answers provide different solutions, the solution is not in Delphi, there has to be various work-arounds, or the code-snipplet was built for very old non-Unicode version of Delphi. You eventually tear your hair out or get exasperated with partial or non-working solutions.
C#, VB.NET users are left out in the cold: if you look around, using MAPI in C# is out of the question as you’ll get all kind of errors as, Extended MAPI is not supported for use with .NET
MAPI is supported in native-languages, such as C++ Builder and Delphi.
MAPI is an interface for, nearly all email clients on the Windows platform. TheBat – an independent email client, ThunderBird – the FireFox competitor to Outlook, HCL Lotus Notes (formerly IBM, formerly Lotus Notes) and Outlook.
MAPI works in both 32-bit and 64-bits, and is installed on Windows 10 as 64-bit MAPI, with 32-bit MAPI compatible DLL.
Installation
Steps:
- Go to https://www.winsoft.sk/smapi.htm for the download link
- Download the trial version
- Unzip smapi.zip
Simple MAPI Demonstration
I will send an email with attachment.
The code-behind the form, is less than 10 lines:
1 2 3 4 5 6 7 8 9 10 11 12 |
begin with SMapiSendMail do begin SendTo := EditTo.Text; Cc := EditCc.Text; Subject := EditSubject.Text; Body.Assign(MemoBody.Lines); Send; end; ShowMessage('Message was sent'); end; |
And successfully sends an email via Outlook:
![demo2 | Embarcadero RAD Studio Delphi C++Builder Blogs](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/09/demo2.png?resize=579%2C495&ssl=1)
The code attaches an email to be sent, with attachment.
![attach | Embarcadero RAD Studio Delphi C++Builder Blogs](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/09/attach.png?resize=691%2C554&ssl=1)
Make Winsoft’s Simple MAPI Component Suite part of your Delphi arsenal.
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition