Announcement

Collapse
No announcement yet.

Scheduling log files in the email

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scheduling log files in the email

    Hi Everyone ,
    Actuall i need any vb script or any program

    that reads the log files and write the mail to particular

    mail id what we are mentioning.So that i can get a mails

    of the log files

    Helping this issue will be greatly appriciated

    Thanks & Regards
    winxandlinx

    EDIT: Moved to correct forum by Tonyyeb
    Last edited by tonyyeb; 24th July 2006, 12:09.

  • #2
    Re: Scheduling log files in the email

    winxandlinx.

    please provide more info first.
    Did you already made a start?
    What kind of logfiles?


    Think before posting
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment


    • #3
      Re: Scheduling log files in the email

      Yes i had made the vb script for that

      Its the IIS log file

      Now i am getting in the email

      Thanks & Regards
      winxandlinx

      Comment


      • #4
        Re: Scheduling log files in the email

        Code:
        set objCDOMail = CreateObject("CDO.Message")
        objCDOMail.From = "[email protected]"
        objCDOMail.To      = "[email protected]"
        objCDOMail.AddAttachment "c:\windows\system32\logfiles\w3svc1\logfile.log"
        objCDOMail.Subject = "IIS Logs"
        objCDOMail.Configuration.Fields.Item _
            ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
        objCDOmail.Configuration.Fields.Item _
            ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
                "YOUR EMAIL SERVER IP ADDRESS GOES HERE" 
        objCDOmail.Configuration.Fields.Item _
            ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
        objCDOmail.Configuration.Fields.Update
        
        objCDOMail.Send
        Set objCDOMail = Nothing
        This will work but you need to add code that will select the latest log by date for example (note: you can't e-mail TODAYS log as the file is in use until midnight so yesterdays would be better)

        I have an additional bit that takes the previous weeks logs and zips them up then it e-mails the zip file.
        Server 2000 MCP
        Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com

        ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

        Comment


        • #5
          Re: Scheduling log files in the email

          yes i had the same

          now its working

          thanks for the code also

          Comment


          • #6
            Re: Scheduling log files in the email

            No problem
            Server 2000 MCP
            Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com

            ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

            Comment

            Working...
            X