Set?? objEmail = CreateObject("CDO.Message")Const CDONameSpace = " With objEmail.Configuration.Fields .Item(CDONameSpace+"sendusing") = 2.Item(CDONameSpace+"smtpserver") = "smtp.21cn.com" .Item(CDONameSpace+"smtpserverport") = 25.Item(CDONameSpace+"smtpauthenticate") = 1.Item(CDONameSpace+"sendusername") = "sleepwom".Item(CDONameSpace+"sendpassword") = "123456"End With With objEmail.From???? = "sleepwom@21cn.com".To?????? = "sleepwom@163.com".Subject? = "Server down" .Textbody = "Server1 is no longer accessible over the network."End With objEmail.Configuration.Fields.UpdateobjEmail.Send Msgbox "success" Set objEmail = Nothing
With objEmail.Configuration.Fields .Item(CDONameSpace+"sendusing") = 2.Item(CDONameSpace+"smtpserver") = "smtp.21cn.com" .Item(CDONameSpace+"smtpserverport") = 25.Item(CDONameSpace+"smtpauthenticate") = 1.Item(CDONameSpace+"sendusername") = "sleepwom".Item(CDONameSpace+"sendpassword") = "123456"End With
With objEmail.From???? = "sleepwom@21cn.com".To?????? = "sleepwom@163.com".Subject? = "Server down" .Textbody = "Server1 is no longer accessible over the network."End With
objEmail.Configuration.Fields.UpdateobjEmail.Send
Msgbox "success"
Set objEmail = Nothing
Powered by: C++博客 Copyright © S.l.e!ep.¢%