Coup
December 22nd 03, 09:18 PM
im trying to send an email from a perfmon alert any ideas?
I have tried this but cant seam to get it to work right... I keep getting
errors in the script...maybe there is a simpler way?
Dim Message As New CDO.Message
Dim Configuration As New CDO.Configuration
Dim Fields As ADODB.Fields
Set Fields = Configuration.Fields
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPServer) = "mail.server.net"
.Item(cdoSMTPConnectionTimeout) = 5
.Update
End With
With iMsg
Set .Configuration = Configuration
.To = szTo
.From = szFrom
.Subject = "Test Message"
.TextBody = "Message Text body"
.Send
End With
Set Message = Nothing
Set Configuration = Nothing
Set Fields = Nothing
End Sub
What am i missing and what is the proper syntax? for this script?
I have tried this but cant seam to get it to work right... I keep getting
errors in the script...maybe there is a simpler way?
Dim Message As New CDO.Message
Dim Configuration As New CDO.Configuration
Dim Fields As ADODB.Fields
Set Fields = Configuration.Fields
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPServer) = "mail.server.net"
.Item(cdoSMTPConnectionTimeout) = 5
.Update
End With
With iMsg
Set .Configuration = Configuration
.To = szTo
.From = szFrom
.Subject = "Test Message"
.TextBody = "Message Text body"
.Send
End With
Set Message = Nothing
Set Configuration = Nothing
Set Fields = Nothing
End Sub
What am i missing and what is the proper syntax? for this script?