Click here to Skip to main content
15,887,267 members
Articles / Programming Languages / Visual Basic

Send Mails in VB with Multiple Attachments using DOS Command Line

Rate me:
Please Sign up or sign in to vote.
2.57/5 (4 votes)
13 Sep 2007CPOL2 min read 42.7K   988   13   1
Send email using DOS command line, the application will read itself txt file and add into email body. Added the size limit of attachments.

Introduction

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.

Background

  • 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.

History

  • 13th September, 2007: Initial post

License

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


Written By
Web Developer
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralToo much of bold text Pin
Vasudevan Deepak Kumar1-Oct-09 2:23
Vasudevan 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.