2009. 10. 14. 02:21
Send Email
2009. 10. 14. 02:21 in 3. Implementation/VB / Java Script
Send Email From a Script
Send Email without Installing the SMTP Service
출처 : Microsoft Script Center
Set objEmail = CreateObject("CDO.Message") objEmail.From = "monitor1@fabrikam.com" objEmail.To = "admin1@fabrikam.com" objEmail.Subject = "Atl-dc-01 down" objEmail.Textbody = "Atl-dc-01 is no longer accessible over the network." objEmail.Send |
Send Email without Installing the SMTP Service
Set objEmail = CreateObject("CDO.Message") objEmail.From = "admin1@fabrikam.com" objEmail.To = "admin2@fabrikam.com" objEmail.Subject = "Server down" objEmail.Textbody = "Server1 is no longer accessible over the network." objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _ "smarthost" objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objEmail.Configuration.Fields.Update objEmail.Send |
출처 : Microsoft Script Center