如何使用带有 HTML 正文的 MAPI 发送邮件?我需要在消息正文中创建表。我正在使用 vb6 和 MAPI 控件。有任何想法吗?
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