Hello,
I am trying to write a VB Script to send out a text email, however when I execute the script I get this error...
-----------------------------------------------------------
Error: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Code: 800A0BB9
Source: ADODB.Fields
----------------------------------------------------------
Here is the code:
Dim iMsg
Dim iConf
Dim Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = iMsg.Configuration
Set Flds = iConf.Fields
Flds(cdoSendUsingMethod) = cdoSendUsingPort
Flds(cdoSMTPServer) = "localhost" 'set as appropriate
Flds(cdoSMTPServerPort) = 25 'set as appropriate
Flds.Update
Set Flds = Nothing
With iMsg
.To = "me@mycompany.com"
.From = "me@mycompany.com"
.CC = "me@mycompany.com"
.Subject = "Your lights are on, but no one is home"
.TextBody = "You left your lights on this morning."
.Fields.Update
.Send
End With
Set iMsg = Nothing
Anyone see where my problem is? Any help is much appreciated.
Thanks in advance.
Rene
I am trying to write a VB Script to send out a text email, however when I execute the script I get this error...
-----------------------------------------------------------
Error: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Code: 800A0BB9
Source: ADODB.Fields
----------------------------------------------------------
Here is the code:
Dim iMsg
Dim iConf
Dim Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = iMsg.Configuration
Set Flds = iConf.Fields
Flds(cdoSendUsingMethod) = cdoSendUsingPort
Flds(cdoSMTPServer) = "localhost" 'set as appropriate
Flds(cdoSMTPServerPort) = 25 'set as appropriate
Flds.Update
Set Flds = Nothing
With iMsg
.To = "me@mycompany.com"
.From = "me@mycompany.com"
.CC = "me@mycompany.com"
.Subject = "Your lights are on, but no one is home"
.TextBody = "You left your lights on this morning."
.Fields.Update
.Send
End With
Set iMsg = Nothing
Anyone see where my problem is? Any help is much appreciated.
Thanks in advance.
Rene