5 Years
Discussion Span
Last Post by debasisdas

Asalam to every one im a begnner in programming hoew can i send an email through vb exe
please help me in under standing:(

Use mapisession control and the mapimessage control.

Use the mapisession to sign on and mapimessage to send and receive messages.

It should work in conjunction with Microsoft Outlook Express.

In the msdn documentation look under using the MAPI controls. The MSDN cd's also provide a sample VB6 MAPI application to help you out.



'Put a label on your form named label1 and change the label caption to : Compose Mail --- or what ever you wish.

Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Command1_Click()
    Call ShellExecute(0&, vbNullString, "Mailto:" & "s.deepak150@gmail.com", vbNullString, vbNullString, vbNormalFocus)
End Sub

Private Sub label1_Click()
 With Label1
 .Drag vbBeginDrag
End With
End Sub

Private Sub label1_DragDrop(Source As Control, X As Single, Y As Single)
    If Source Is Label1 Then
        With Label1
 '   Call ShellExecute(0&, vbNullString, "Mailto:" & .Caption, vbNullString, vbNullString, vbNormalFocus)
    End With
    End If
End Sub

Hi im a begenner so plese tell me in detail please tell me the purpose of every statement

go and read books

Just read books and you would understand better. IF you want everything given to you, you can as well just ask for the full project


Another approach (using database).

If using oracle as database, compile this procedure in database.

Call the same from VB 6.0 using ADO like this.

The second link is a sample only, to show how to call a oracle stored procedure from VB 6.0..

Edited by debasisdas: n/a

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.