Visual Basic
  Home arrow Visual Basic arrow Page 2 - Sending Email With MAPI Components in Visu...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC

Sending Email With MAPI Components in Visual Basic
By: Jason Brimblecombe
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 204
    2002-02-15

    Table of Contents:
  • Sending Email With MAPI Components in Visual Basic
  • Using MAPI Components
  • Using MAPI Components (contd.)
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Sending Email With MAPI Components in Visual Basic - Using MAPI Components


    (Page 2 of 4 )

    Using the MAPI controls involves two steps: firstly establishing a MAPI session, and secondly using various MAPI properties and methods to access and manage an individual inbox; for example, to create and send a message, include a file attachment, verify the recipient's email address against the email system's address book, etc.

    Let's get started on the Visual Basic project, shall we? Start by creating a new standard executable application. You will need to add the MAPI components to your project, so start by clicking project from the top menu and find the menu item components (you may also use the hotkey CTRL+T). When the components window appears, scroll down the list until you find the Microsoft MAPI controls:

    Adding the MAPI controls to our project

    Place a check in the box next to it, and then click the OK button. Two additional controls have been added to the Visual Basic toolbox; they're called MAPISession and MAPIMessages. We will be using both of these in our application.

    Setting up the form

    Let's setup the layout of our Visual Basic application. Our form will contain four textboxes, three labels, four command buttons, and both of the MAPI components. You should layout the controls on your form so that it looks like this (alternatively, you can see the support material for this article and download the complete project):

    The layout of our MAPI VB form

    Here are the details of each component on our Visual Basic form:

    Details of the controls on our form

    More Visual Basic Articles
    More By Jason Brimblecombe


       · This is great, but I don't like the way it asks me if I want to allow the program to...
       · "By: Anonymous Loozahat: 09-14-08 @ 8:21 pm EST This is great, but I don't like...
       · I am happy with the solution provided.But I am unable to send html mail using...
       · I found this an excellent introduction to basic email operation.Nice and clear...
     

    VISUAL BASIC ARTICLES

    - Developing an XML Web Service Using Visual S...
    - Creating an HTML File List with VB
    - Fun with Email: VB6, CDO, MAPI, and a Remote...
    - Extranet/Intranet Dictionary Cracker in VB
    - Finding Default App Icons With Visual Basic
    - Registry Fever With Visual Basic
    - Implementing An ADO Data Control With VB6
    - Printing With Visual Basic
    - MSMQ Part 1/2: Architecture and Simple Imple...
    - Magnifying The Desktop With Visual Basic
    - Sending Email With MAPI Components in Visual...
    - Two Person Chat With The Winsock Control And...
    - A Real-Time ActiveX News Control
    - Accessing the Windows API in Visual Basic







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT