Click here to Skip to main content
13,055,754 members (51,746 online)
Click here to Skip to main content
Add your own
alternative version


13 bookmarked
Posted 13 Sep 2007

Send Mails in VB with Multiple Attachments using DOS Command Line

, 13 Sep 2007
Rate this:
Please Sign up or sign in to vote.
Send email using DOS command line, the application will read itself txt file and add into email body. Added the size limit of attachments.


Messaging Application Programming Interface (MAPI) is a messaging architecture and a Component Object Model based API for Microsoft Windows. MAPI allows client programs to become (electronic mail) messaging-enabled, -aware, or -based by calling MAPI subsystem routines that interface with certain messaging systems and message stores. MAPI refers both to the application programming interface as well as the proprietary protocol which Microsoft Outlook uses to communicate with Microsoft Exchange.

As well as the Extended MAPI client interface, programming calls can be made indirectly through the API client interface Simple MAPI, or through the Common Messaging Calls (CMC) API client interface, or by the object-based CDO Library interface. These three methods are easier to use and designed for less complex messaging-enabled and -aware applications. The full Extended MAPI interface is required for messaging-based applications.

MAPI was originally designed by Microsoft. The company founded its Microsoft Mail team in 1987, but it was not until it acquired Consumers Software Inc in 1991 to obtain Network Courier that it had a messaging product. Reworked, it was sold as Microsoft PC Mail (or Microsoft Mail for PC Networking). The basic API to Microsoft PC Mail was MAPI version 0. MAPI uses functions based on the X.400 XAPIA standard.

Extended MAPI is the main e-mail data access method used by Microsoft Exchange. Simple MAPI and CMC were removed from Exchange 2003.


  • You can send mails using DOS command line parameter.
  • You can send multiple attachments using this sample app.
  • You can check the size of attachments.
  • The run sample command line parameter is "Mapimail.exe FolderName|FileName|status"

Points of Interest

  1. I would like to say that the mapi mail method is very easy and fast to send mails.
  2. There is no extra installation required in other PCs to run this.


  • 13th September, 2007: Initial post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
Australia Australia
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralToo much of bold text Pin
Vasudevan Deepak Kumar1-Oct-09 2:23
memberVasudevan Deepak Kumar1-Oct-09 2:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 13 Sep 2007
Article Copyright 2007 by chandrasing.mahale
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid