|
用MAPI发送邮件,不知道为什么发了之后总是存在outlook的发件箱里,得要把outlook打开才能发送出去,那应该怎么样才能直接就发送出去而不用打开outlook呢?帮帮忙阿!
程序如下:
Private Sub email_Click()
MAPISession1.SignOn
With MAPIMessages1
.MsgIndex = -1
.RecipDisplayName = email_address.Text
.MsgSubject = txtSubject.Text
.SessionID = MAPISession1.SessionID
.AttachmentPathName = 路径名
.Send
End With
MAPISession1.SignOff
MsgBox "邮件发送完毕!", , "发送邮件"
End Sub
|
|