|
Sending mail using MAPI, I do n’t know why it always exists in Outlook ’s outbox after sending it. I have to open Outlook to send it out. How can I send it directly without opening Outlook? Help out!
The procedure is as follows:
Private Sub email_Click ()
MAPISession1.SignOn
With MAPIMessages1
.MsgIndex = -1
.RecipDisplayName = email_address.Text
.MsgSubject = txtSubject.Text
.SessionID = MAPISession1.SessionID
.AttachmentPathName = path name
.Send
End With
MAPISession1.SignOff
MsgBox "Mail sent!",, "Send mail"
End Sub |
|