NameSpace = "http://schemas.microsoft.com/cdo/configuration/" Set Email = CreateObject("CDO.Message") Email.From = "[email protected]" Email.To = "[email protected],[email protected]" Email.Subject = "MySQL Bak" Email.Textbody = "MySQL 数据每日备份" y = year(Now) m = Month(Now) d = day(Now) If len(m) = 1 Then m = "0" & m If len(d) = 1 Then d = "0" & d fileName = y&""&m&""&d Email.AddAttachment "c:\mysql_bak\sql\gbds_"+fileName+".sql" With Email.Configuration.Fields .Item(NameSpace&"sendusing") = 2 .Item(NameSpace&"smtpserver") = "smtp.qiye.163.com" .Item(NameSpace&"smtpserverport") = 25 .Item(NameSpace&"smtpauthenticate") = 1 .Item(NameSpace&"sendusername") = "[email protected]" .Item(NameSpace&"sendpassword") = "xxxxx" .Update End With Email.Send
windws下发邮件vbs脚本
时间: 2024-10-16 06:12:55