Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Sending E-mail using MAPI control
Author:
john
E-mail:
Click to e-mail author
Submitted:
9/26/2004
Version:
VB5
Compatibility:
VB5, VB6
Category:
Internet Programming
Views:
24857
Sending E-mail using MAPI control.
Declarations:
'none
Code:
Private Sub CmdExit_Click() End End Sub Private Sub CmdSend_Click() On Error GoTo SendErrorMailError 'sign on system MAPSession.UserName = txtUserid.Text MAPSession.Password = txtUserpass.Text MAPSession.SignOn 'send e-mail MAPMessage.SessionID = MAPSession.SessionID MAPMessage.Compose MAPMessage.RecipDisplayName = txtname.Text MAPMessage.RecipAddress = txtId.Text MAPMessage.AddressResolveUI = False MAPMessage.MsgSubject = txtSub.Text MAPMessage.MsgNoteText = RtMessage.Text MAPMessage.Send False 'sign out MAPSession.SignOff MsgBox "Message Sent" Exit Sub SendErrorMailError: ' There was an error sending the mail. ' Just present the message. MsgBox "Error " & Format$(Err.Number) & _ " sending mail." & vbCrLf & _ Err.Description Exit Sub End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement