VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Email with MAPI. Simply add the code to a form and run it.

by Chris Goller (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 1st November 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Email with MAPI. Simply add the code to a form and run it.

Rate Email with MAPI. Simply add the code to a form and run it.




With MAPISession1
        .DownLoadMail = False
        .LogonUI = True
        .SignOn
        
        MAPIMessages1.SessionID = .SessionID
        ComposeMessage
End With
End Sub


Private Sub ComposeMessage()
    On Error GoTo ComposeErr
    Dim subjecttxt As String
    Dim address As String

    subjecttxt = "insert subject text here"
    address = "insert address here"
   
    
    With MAPIMessages1
        .Compose
        .RecipDisplayName = address
        .MsgSubject = subjecttxt
        .ResolveName
        .Send True
    
    End With
    
    Exit Sub

ComposeErr:
    Debug.Print Err.Number, Err.Description
    Resume Next
End Sub




Download this snippet    Add to My Saved Code

Email with MAPI. Simply add the code to a form and run it. Comments

No comments have been posted about Email with MAPI. Simply add the code to a form and run it.. Why not be the first to post a comment about Email with MAPI. Simply add the code to a form and run it..

Post your comment

Subject:
Message:
0/1000 characters