Hello Kaul1jos,
Try this:
' Begin Code -------------------------------------------------
Dim oName, ODomain, oMyIP, oTo, Attach
' Set "To:" names.
T1 = "Someone@somedomain.com"
T2 = "SomeoneElse@somedomain.com"
Subject = "Email Test " & now
Body = "**********************************************************************************************" & vbCrlf & _
"**************************************Administrator Test************************************** "& vbCrlf & _
"**********************************************************************************************" & vbCrlf & _
"This is an automated message."
' Set the From name
oName = "EmailTester"
' Company Internet Domain Name
ODomain = "YourDomainHere.com"
' Set the SMTP server IP
oMyIP = "Your.SMTP.Server.Here"
' Where do you want the message to be delivered
oTo = T1 &"; "& T2
' Set the visual basic constants as they do not exist within VBScript.
' Do not set your smtp server information here.
Const cdoSendUsingMethod = "
_
cdoSendUsingPort = 2, _
cdoSMTPServer = "
'// Create the CDO connections.
Dim iMsg, iConf, Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
'// SMTP server configuration.
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
'// Set the SMTP server address here.
.Item(cdoSMTPServer) = oMyIP
.Update
End With
'// Set the message properties.
With iMsg
Set .Configuration = iConf
.To = oTo
.From = oName
.Subject = Subject
.TextBody = Body
End With
'// Add attachments
'Set Logfldr = Ofso.GetFolder(LogDir)
'For Each File In Logfldr.files
' Attach = File.name
' iMsg.AddAttachment LogDir &"\"& Attach
'Next
'Send the message.
iMsg.Send
' End Code -------------------------------------------------