本人觉得批处理本来来解决这个问题好像是行不通的,除了第三方工具,不过可以批处理+VBS脚本来实现,我给你一下VBS脚本发送邮件的代码,你用他和批处理结合就可以使用了,代码如下
NameSpace="http://schemas.microsoft.com/cdo/configuration/"
Set Email=CreateObject("CDO.Message")
Email.From="
bwli@ql-art.com"
Email.To="
bagpipe737@163.com"
Email.Subject="我只是试试而已"
Email.Textbody="OK!"
Email.AddAttachment "C:\gp.rar"
With Email.Configuration.Fields
.Item(NameSpace&"sendusing")=2
.Item(NameSpace&"smtpserver")="mail.ql-art.com"
.Item(NameSpace&"smtpserverport")=25
.Item(NameSpace&"smtpauthenticate")=1
.Item(NameSpace&"sendusername")="xxx"
.Item(NameSpace&"sendpassword")="xxx"
.Update
End With
Email.Send
wscript.echo "Send Finish!!!!!! "