0
set cdoConfig = CreateObject("CDO.Configuration")
with cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "localhost"
.Item(cdoSMTPAuthenticate) = 1
.Item(cdoSendUsername) = "[email protected]"
.Item(cdoSendPassword) = "password"
.Update
end with
set cdoMessage = CreateObject("CDO.Message")
with cdomessage
set .Configuration = cdoConfig
.From = "[email protected]"
.To = email
.Subject = subject
.HTMLBody = message
.AddAttachment "c:/i/report.pdf"
.Send
end with
set cdomessage = nothing
set cdoconfig = nothing
一切都將發現它發送的時候,但收件人收到消息爲「未命名附件000X.pdf」使用VBScript
如何給附件的名稱給人一種附件的名稱?
@kricket,它有幫助嗎?只是好奇。 – vins
工作完美,我可以問問你在哪裏找到這些信息? – kqlambert
@kricket,我已經創建了這個(通過引用MSDN中的CDO對象模型)long back(4年前)爲項目自動發送狀態電子郵件。但我們沒有機會發送任何附件。 – vins