Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - error CDO.Message - VBScript

Reply
 
Old 03-19-2009   #1 (permalink)
Jaime


 
 

error CDO.Message - VBScript

hi,

to see if I can help.
I have the following script that until a few days ago it worked correctly.
Has not touched any of the settings in Exchange 2003 SP2 or in the Antispam
/ antivirus.

Gives me the error: 80040212 transport lost its connection to the server to
30 seconds to execute.

He continued to test and to my surprise, I realized that if I run the
script, 2.3, or more times in a row, it works correctly, but if you run only
once, giving this error.

What could be due to?. thanks.

Exchange 2003 SP2

#######################################################
'Vbscript starts here
strSmartHost = "10.0.100.1" 'sets the name of the SMTP relay server
strSMTPPort = "25" 'sets the port used for SMTP traffic
strFromAddr = "user1@xxxxxx" 'sets the address alarm e-mails are sent
from
strToAddr = "user2@xxxxxx" 'sets the address alarm e-mails are sent to

SET objEmail = CreateObject("CDO.Message")

strSubject = "SendMail"
Set objNetwork = WScript.CreateObject("WScript.Network")
strComputerName = objNetwork.ComputerName
strSubject = strSubject

strTextBody = ""
Call SendEmail(strFromAddr,strToAddr,strSubject, strTextBody)

SUB SendEmail(varFrom, varTO, varSubject, varTextBody)
objEmail.From = varFrom
objEmail.To = varTo
objEmail.Subject = varSubject
objEmail.TextBody = varTextBody
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHostobjEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = strSMTPPort objEmail.Configuration.Fields.UpdateobjEmail.SendEND SUB#######################################################

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Zip error using VBSCRIPT Error:Object not a collection VB Script
VBScript halts with out error message VB Script
How to remove vbscript text from message box VB Script
Cannot uninstall iTunes: VBscript message Software
Windows Mail Error Sending a Message - Non-specific Error Message Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46