fdt = FormatDateTime(Date)receiptions = "xxx@cn.xxx.com"ccreceiptions="xxxx@cn.xxx.com;xxx@cn.xxx.com;xx@cn.xxx.com"Subject = "xx的Usarp入库日志 " & fdtBody = "附件是xx的Usarp数据导入到Oracle数据库,在"& fdt & "执行的日志报告,请查收!"Attachments = Array("F:\xx\log4mail.log") Dim xOutLookDim xMailOn Error Resume NextSet xOutLook = GetObject(, "Outlook.Application")If xOutLook Is Nothing ThenSet xOutLook = CreateObject("Outlook.Application")End IfSet xMail = xOutLook.CreateItem(olMailItem)With xMail.DisplayDim signaturesignature = .HTMLBody.To = receiptions.Cc=ccreceiptions.Subject = Subject.HTMLBody = Body.Importance = olImportanceHigh Dim xDocSet xDoc = xMail.Application.ActiveInspector.WordEditorIf IsArray(Attachments) ThenDim attachmentFor Each attachment In Attachments.Attachments.Add attachmentNextEnd If.HTMLBody = .HTMLBody & signature.SendEnd With