Windows Vista Forums

How do I configure Windows 2003 to get VBScript email with CDOSYS.
  1. #1


    Drummer_Geek Guest

    How do I configure Windows 2003 to get VBScript email with CDOSYS.

    I am trying to use CDO in VBScript to send email from one server to a
    separate exchange server. The article at
    http://support.microsoft.com/kb/171440/ states that CDOSYS version 6 library
    is obtained "through installation" of Windows 2003 but alas, email does not
    work and I am unable to locate the CDOSYS.dll on my Windows 2003 system.

    I have tried configuring SMTP with Control Panel -> Add or Remove Programs
    -> Add/Remove Windows Components -> Application Server -> Internet
    Information Services (IIS) -> SMTP Service) but that didn't give me the
    CDOSYS.dll or CDO functionality either.

    What "installation" feature do I need to install/configure, to get this
    functionality?

    --
    It''s my flaws that keep me humble



      My System SpecsSystem Spec

  2. #2


    OldDog Guest

    Re: How do I configure Windows 2003 to get VBScript email withCDOSYS.

    On Mar 4, 7:33*pm, Drummer_Geek <Drummer_G...@newsgroup> wrote:

    > I am trying to use CDO in VBScript to send email from one server to a
    > separate exchange server. *The article athttp://support.microsoft.com/kb/171440/states that CDOSYS version 6 library
    > is obtained "through installation" of Windows 2003 but alas, email does not
    > work and I am unable to locate the CDOSYS.dll on my Windows 2003 system.
    >
    > I have tried configuring SMTP with Control Panel -> Add or Remove Programs
    > -> Add/Remove Windows Components -> Application Server -> Internet
    > Information Services (IIS) -> *SMTP Service) but that didn't give me the
    > CDOSYS.dll or CDO functionality either.
    >
    > What "installation" feature do I need to install/configure, to get this
    > functionality?
    >
    > --
    > It''s my flaws that keep me humble
    Here is how I do it:

    '<------------Begin----------------------------------------------->

    adminmail = "somebody@newsgroup"
    '
    smtp = "mail_server name or IP"
    Set mailing = CreateObject("CDO.Message")
    Set wshNet = CreateObject("WScript.Network")

    mailing.From = ("fromSomeone@newsgroup")
    mailing.To = adminmail
    mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    configuration/sendusing") = 2
    mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    configuration/smtpserver") = smtp
    mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    configuration/smtpserverport") = 25
    mailing.Subject = header & "Data Transfer Success logs"
    sFullProductionMessage = "See attached file..." & vbcrlf
    mailing.TextBody = sFullProductionMessage
    mailing.Configuration.Fields.Update
    mailing.AddAttachment "R:\dailylog.txt"
    mailing.Send
    On Error Goto 0

    '<---------------------------- END -----------------------------------

    >
    What if you wanted the Attachment to be the body text?

    Dim fso, f
    Set fso = CreateObject("Scripting.FileSystemObject")
    'Open the file for reading
    Set f = fso.OpenTextFile("C:\SendLogs\dailylog.txt", ForReading)
    'The ReadAll method reads the entire file into the variable BodyText
    BodyText = f.ReadAll
    'Close the file
    f.Close
    Set f = Nothing
    Set fso = Nothing

    And in your message function or sub or whatever;

    mailing.TextBody = BodyText

    How about CC?

    mailing.Cc = "someoneelse@newsgroup"

      My System SpecsSystem Spec

  3. #3


    Drummer_Geek Guest

    Re: How do I configure Windows 2003 to get VBScript email with CDO

    Thanks but I already have the VBScript code (similiar to yours, minus the
    wshnet object, sure you need that?), it just doesn't work. I am unable to
    locate CDOSYS on the system. Something is not configured.

    --
    It''s my flaws that keep me humble


    "OldDog" wrote:

    > On Mar 4, 7:33 pm, Drummer_Geek <Drummer_G...@newsgroup> wrote:

    > > I am trying to use CDO in VBScript to send email from one server to a
    > > separate exchange server. The article athttp://support.microsoft.com/kb/171440/states that CDOSYS version 6 library
    > > is obtained "through installation" of Windows 2003 but alas, email does not
    > > work and I am unable to locate the CDOSYS.dll on my Windows 2003 system.
    > >
    > > I have tried configuring SMTP with Control Panel -> Add or Remove Programs
    > > -> Add/Remove Windows Components -> Application Server -> Internet
    > > Information Services (IIS) -> SMTP Service) but that didn't give me the
    > > CDOSYS.dll or CDO functionality either.
    > >
    > > What "installation" feature do I need to install/configure, to get this
    > > functionality?
    > >
    > > --
    > > It''s my flaws that keep me humble
    >
    > Here is how I do it:
    >
    > '<------------Begin----------------------------------------------->
    >
    > adminmail = "somebody@newsgroup"
    > '
    > smtp = "mail_server name or IP"
    > Set mailing = CreateObject("CDO.Message")
    > Set wshNet = CreateObject("WScript.Network")
    >
    > mailing.From = ("fromSomeone@newsgroup")
    > mailing.To = adminmail
    > mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    > configuration/sendusing") = 2
    > mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    > configuration/smtpserver") = smtp
    > mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    > configuration/smtpserverport") = 25
    > mailing.Subject = header & "Data Transfer Success logs"
    > sFullProductionMessage = "See attached file..." & vbcrlf
    > mailing.TextBody = sFullProductionMessage
    > mailing.Configuration.Fields.Update
    > mailing.AddAttachment "R:\dailylog.txt"
    > mailing.Send
    > On Error Goto 0
    >
    > '<---------------------------- END -----------------------------------

    > >
    >
    > What if you wanted the Attachment to be the body text?
    >
    > Dim fso, f
    > Set fso = CreateObject("Scripting.FileSystemObject")
    > 'Open the file for reading
    > Set f = fso.OpenTextFile("C:\SendLogs\dailylog.txt", ForReading)
    > 'The ReadAll method reads the entire file into the variable BodyText
    > BodyText = f.ReadAll
    > 'Close the file
    > f.Close
    > Set f = Nothing
    > Set fso = Nothing
    >
    > And in your message function or sub or whatever;
    >
    > mailing.TextBody = BodyText
    >
    > How about CC?
    >
    > mailing.Cc = "someoneelse@newsgroup"
    > .
    >

      My System SpecsSystem Spec

  4. #4


    Pegasus [MVP] Guest

    Re: How do I configure Windows 2003 to get VBScript email with CDO

    Did you try copying cdosys.dll from some other system (e.g. WinXP) and
    registering it?

    "Drummer_Geek" <Drummer_Geek@newsgroup> wrote in message
    news:CEF4E148-1357-45F4-93BA-D418E1875B0B@newsgroup

    > Thanks but I already have the VBScript code (similiar to yours, minus the
    > wshnet object, sure you need that?), it just doesn't work. I am unable to
    > locate CDOSYS on the system. Something is not configured.
    >
    > --
    > It''s my flaws that keep me humble
    >
    >
    > "OldDog" wrote:
    >

    >> On Mar 4, 7:33 pm, Drummer_Geek <Drummer_G...@newsgroup> wrote:

    >> > I am trying to use CDO in VBScript to send email from one server to a
    >> > separate exchange server. The article
    >> > athttp://support.microsoft.com/kb/171440/states that CDOSYS version 6
    >> > library
    >> > is obtained "through installation" of Windows 2003 but alas, email does
    >> > not
    >> > work and I am unable to locate the CDOSYS.dll on my Windows 2003
    >> > system.
    >> >
    >> > I have tried configuring SMTP with Control Panel -> Add or Remove
    >> > Programs
    >> > -> Add/Remove Windows Components -> Application Server -> Internet
    >> > Information Services (IIS) -> SMTP Service) but that didn't give me
    >> > the
    >> > CDOSYS.dll or CDO functionality either.
    >> >
    >> > What "installation" feature do I need to install/configure, to get this
    >> > functionality?
    >> >
    >> > --
    >> > It''s my flaws that keep me humble
    >>
    >> Here is how I do it:
    >>
    >> '<------------Begin----------------------------------------------->
    >>
    >> adminmail = "somebody@newsgroup"
    >> '
    >> smtp = "mail_server name or IP"
    >> Set mailing = CreateObject("CDO.Message")
    >> Set wshNet = CreateObject("WScript.Network")
    >>
    >> mailing.From = ("fromSomeone@newsgroup")
    >> mailing.To = adminmail
    >> mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    >> configuration/sendusing") = 2
    >> mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    >> configuration/smtpserver") = smtp
    >> mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    >> configuration/smtpserverport") = 25
    >> mailing.Subject = header & "Data Transfer Success logs"
    >> sFullProductionMessage = "See attached file..." & vbcrlf
    >> mailing.TextBody = sFullProductionMessage
    >> mailing.Configuration.Fields.Update
    >> mailing.AddAttachment "R:\dailylog.txt"
    >> mailing.Send
    >> On Error Goto 0
    >>
    >> '<---------------------------- END -----------------------------------

    >> >
    >>
    >> What if you wanted the Attachment to be the body text?
    >>
    >> Dim fso, f
    >> Set fso = CreateObject("Scripting.FileSystemObject")
    >> 'Open the file for reading
    >> Set f = fso.OpenTextFile("C:\SendLogs\dailylog.txt", ForReading)
    >> 'The ReadAll method reads the entire file into the variable BodyText
    >> BodyText = f.ReadAll
    >> 'Close the file
    >> f.Close
    >> Set f = Nothing
    >> Set fso = Nothing
    >>
    >> And in your message function or sub or whatever;
    >>
    >> mailing.TextBody = BodyText
    >>
    >> How about CC?
    >>
    >> mailing.Cc = "someoneelse@newsgroup"
    >> .
    >>

      My System SpecsSystem Spec

  5. #5


    Drummer_Geek Guest

    Re: How do I configure Windows 2003 to get VBScript email with CDO

    YES. We copied and uncomplressed it from the i386 installation folder for
    Windows 2003, so it's the right version. We put it in \system32 and tried to
    regsrvr it but it refuses to register. I discovered the following
    dependencies list (at newsvoter.com) and have confirmed that all these are
    present:
    msvcrt.dll, oleaut32.dll, version.dll, wininet.dll, urlmon.dll,
    inetcomm.dll, kernel32.dll, advapi.dll, user32.dll on the server. It doesn't
    seem like it should be this hard.

    --

    "Pegasus [MVP]" wrote:

    > Did you try copying cdosys.dll from some other system (e.g. WinXP) and
    > registering it?
    >
    > "Drummer_Geek" <Drummer_Geek@newsgroup> wrote in message
    > news:CEF4E148-1357-45F4-93BA-D418E1875B0B@newsgroup

    > > Thanks but I already have the VBScript code (similiar to yours, minus the
    > > wshnet object, sure you need that?), it just doesn't work. I am unable to
    > > locate CDOSYS on the system. Something is not configured.
    > >
    > > --
    > > It''s my flaws that keep me humble
    > >
    > >
    > > "OldDog" wrote:
    > >

    > >> On Mar 4, 7:33 pm, Drummer_Geek <Drummer_G...@newsgroup> wrote:
    > >> > I am trying to use CDO in VBScript to send email from one server to a
    > >> > separate exchange server. The article
    > >> > athttp://support.microsoft.com/kb/171440/states that CDOSYS version 6
    > >> > library
    > >> > is obtained "through installation" of Windows 2003 but alas, email does
    > >> > not
    > >> > work and I am unable to locate the CDOSYS.dll on my Windows 2003
    > >> > system.
    > >> >
    > >> > I have tried configuring SMTP with Control Panel -> Add or Remove
    > >> > Programs
    > >> > -> Add/Remove Windows Components -> Application Server -> Internet
    > >> > Information Services (IIS) -> SMTP Service) but that didn't give me
    > >> > the
    > >> > CDOSYS.dll or CDO functionality either.
    > >> >
    > >> > What "installation" feature do I need to install/configure, to get this
    > >> > functionality?
    > >> >
    > >> > --
    > >> > It''s my flaws that keep me humble
    > >>
    > >> Here is how I do it:
    > >>
    > >> '<------------Begin----------------------------------------------->
    > >>
    > >> adminmail = "somebody@newsgroup"
    > >> '
    > >> smtp = "mail_server name or IP"
    > >> Set mailing = CreateObject("CDO.Message")
    > >> Set wshNet = CreateObject("WScript.Network")
    > >>
    > >> mailing.From = ("fromSomeone@newsgroup")
    > >> mailing.To = adminmail
    > >> mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    > >> configuration/sendusing") = 2
    > >> mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    > >> configuration/smtpserver") = smtp
    > >> mailing.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/
    > >> configuration/smtpserverport") = 25
    > >> mailing.Subject = header & "Data Transfer Success logs"
    > >> sFullProductionMessage = "See attached file..." & vbcrlf
    > >> mailing.TextBody = sFullProductionMessage
    > >> mailing.Configuration.Fields.Update
    > >> mailing.AddAttachment "R:\dailylog.txt"
    > >> mailing.Send
    > >> On Error Goto 0
    > >>
    > >> '<---------------------------- END -----------------------------------
    > >> >
    > >>
    > >> What if you wanted the Attachment to be the body text?
    > >>
    > >> Dim fso, f
    > >> Set fso = CreateObject("Scripting.FileSystemObject")
    > >> 'Open the file for reading
    > >> Set f = fso.OpenTextFile("C:\SendLogs\dailylog.txt", ForReading)
    > >> 'The ReadAll method reads the entire file into the variable BodyText
    > >> BodyText = f.ReadAll
    > >> 'Close the file
    > >> f.Close
    > >> Set f = Nothing
    > >> Set fso = Nothing
    > >>
    > >> And in your message function or sub or whatever;
    > >>
    > >> mailing.TextBody = BodyText
    > >>
    > >> How about CC?
    > >>
    > >> mailing.Cc = "someoneelse@newsgroup"
    > >> .
    > >>
    > .
    >

      My System SpecsSystem Spec

How do I configure Windows 2003 to get VBScript email with CDOSYS. problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
are VBscript on Windows server 2003 and VBscript on WS2008 compatible? Francois Lafont VB Script 9 26 Apr 2010
CDOSYS.dll missing - How do I config Win 2003 to get VBScript emai Drummer_Geek VB Script 2 07 Oct 2009
How do you configure Internet Printing on Windows Server 2003/SBS2003? BadBoy House SBS Server 1 09 Sep 2009
VBScript and CDOSYS paulmitchell507 VB Script 0 12 Aug 2008
How to configure Windows Mail to and Outlook 2003 .pst file? Aravindhan Vista mail 1 06 Oct 2007