如何使用MAPI和HTML正文發送郵件?我需要在消息體中創建表。 我正在使用vb6和MAPI控件。有任何想法嗎?使用VB6中的MAPI控件發送帶HTML內容的郵件
Function MailSend(sSendTo As String, sSubject As String, sText As String) As Boolean
On Error GoTo ErrHandler
With MAPISession1
If .SessionID = 0 Then
.DownLoadMail = False
.LogonUI = True
.SignOn
.NewSession = True
MAPIMessages1.SessionID = .SessionID
End If
End With
With MAPIMessages1
.Compose
.RecipAddress = sSendTo
.AddressResolveUI = True
.ResolveName
.MsgSubject = sSubject
.MsgNoteText = sText
.Send False
End With
MailSend = True
Exit Function
ErrHandler:
'MsgBox Err.Description
MailSend = False
End Function
「將body設置爲NULL並附加HTML文件」得到我需要的:)謝謝。喜歡這個論壇。 – babboon 2013-04-06 07:20:24