Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

SCCM cdosys send mail vbscript WinPE 4.0 errors

$
0
0

I in my SCCM 2007 environment could use cdosys.dll and vbscript to send mail. I have all the same files and the same script when I run the script I always get the Error " error in loading dll: objCDOSYSCon.Field" the only difference is I am now in WinPE 4.0 as opposed to WinPe 3.0, I have even used the exact same cdosys.dll and every other file I can and tried to get newer versions and tested.

Does anyone have any insight on why I'm thinking WinPE 4.o issue?

Here is the script:

Call SendMailCDOSYS("who@where.com","StartScript"," Computer ")

Sub SendMailCDOSYS (strRecipient,strSubject,strMessage) 
Set objCDOSYSMail = CreateObject("CDO.Message")
Set objcdosyscon = CreateObject ("CDO.Configuration")


objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.tc.com"

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

objCDOSYSCon.Fields.Update

 

 
Set objCDOSYSMail.Configuration = objcdosyscon


objCDOSYSMail.From = "who@where.com"
 
objCDOSYSMail.To = strRecipient

objCDOSYSMail.Subject = strSubject

 

'‘Set the e-mail body format (HTMLBody=HTML TextBody=Plain)

objCDOSYSMail.TextBody = strMessage

 


objCDOSYSMail.Send

 

 

Set objCDOSYSMail = Nothing
 
Set objCDOSYSCon = Nothing


End Sub



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>