Add You
#1 in Business Subscribe Email Print

You are here: Home > Computers and Technology > Computers and Technology > VBScript - Send E-Mail with CDO.Message

Tags

  • pingstatus
  • after
  • email
  • pingstatus where
  • pingstatus where
  • option explicitdim

  • Links

  • Offshore Outsourcing - Better Read the Fine Print
  • Understanding Inflammatory Bowel Disease And GERD
  • Five Reasons Why Leaders Fail to Create Successful Change
  • Add You - VBScript - Send E-Mail with CDO.Message

    Two Types of Business Plan Executive Summaries
    Companies seeking capital often ask how long the Executive Summary of their business plan should be. The answer depends upon the use of the summary, mainly determining if 1) it precedes the full business plan, or 2) it will be used as a stand-alone do
    .Message")

    objMessage.From = strComputer & "@YourDomain.com"

    objMessage.To = "Admin@YourDomain.com"

    objMessage.Subject = strComputer & " is unavailable"

    objMessage.Textbody = strComputer & " is no longer accessible over the network."

    objMessage.Configu

    The Marketing of Questions
    He who asks questions is attempting to be in control. That fact can be observed in any dialog. Asking questions directs the responses, and directs the dialog.Questioning can take one of three forms:1. Manipulative quest
    Some my feel that apart from it being a nifty trick, there isn’t any real practical use for sending E-Mail from a script but lets imagine the following scenario:

    You have a business critical server called "ImpServ01" that must be available at all costs. The following script can be setup to run every five minutes to check the availability of the server and email you if the server becomes unavailable. This example uses a SMTP server called "SMTP.YourDomain.com" and sends mail from "ImpServ01@YourDomain.com" to "Admin@YourDomain.com".

    Option Explicit

    Dim strComputer Dim colPingStatus Dim objPingStatus Dim objMessage

    strComputer = "ImpSrv01"

    Set colPingStatus = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("SELECT * FROM Win32_PingStatus WHERE address = '" & strComputer & "'")

    For Each objPingStatus In colPingStatus

    If IsNull(objPingStatus.StatusCode) or objPingStatus.StatusCode <> 0 Then

    Set objMessage = CreateObject("CDO.Message")

    objMessage.From = strComputer & "@YourDomain.com"

    objMessage.To = "Admin@YourDomain.com"

    objMessage.Subject = strComputer & " is unavailable"

    objMessage.Textbody = strComputer & " is no longer accessible over the network."

    objMessage.Configu

    Link Popularity: The Stepping Stone For Greater Online Presence
    What exactly is link popularity? It is not Page Rank. Link popularity is the measure of how popular your page is and how many links are directed to your site; and the quality of the sites that are directed to your site. Page Rank, on the other hand, i
    an be setup to run every five minutes to check the availability of the server and email you if the server becomes unavailable. This example uses a SMTP server called "SMTP.YourDomain.com" and sends mail from "ImpServ01@YourDomain.com" to "Admin@YourDomain.com".

    Option Explicit

    Dim strComputer Dim colPingStatus Dim objPingStatus Dim objMessage

    strComputer = "ImpSrv01"

    Set colPingStatus = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("SELECT * FROM Win32_PingStatus WHERE address = '" & strComputer & "'")

    For Each objPingStatus In colPingStatus

    If IsNull(objPingStatus.StatusCode) or objPingStatus.StatusCode <> 0 Then

    Set objMessage = CreateObject("CDO.Message")

    objMessage.From = strComputer & "@YourDomain.com"

    objMessage.To = "Admin@YourDomain.com"

    objMessage.Subject = strComputer & " is unavailable"

    objMessage.Textbody = strComputer & " is no longer accessible over the network."

    objMessage.Configu

    How to Attract and Keep a Personal Assistant
    Many managers will often say their personal assistant is invaluable to them yet they often treat them as if they're not.Day after day, week after week the P.A. is in the office, slogging away making sure the work gets done. In many instances it
    omain.com" to "Admin@YourDomain.com".

    Option Explicit

    Dim strComputer Dim colPingStatus Dim objPingStatus Dim objMessage

    strComputer = "ImpSrv01"

    Set colPingStatus = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("SELECT * FROM Win32_PingStatus WHERE address = '" & strComputer & "'")

    For Each objPingStatus In colPingStatus

    If IsNull(objPingStatus.StatusCode) or objPingStatus.StatusCode <> 0 Then

    Set objMessage = CreateObject("CDO.Message")

    objMessage.From = strComputer & "@YourDomain.com"

    objMessage.To = "Admin@YourDomain.com"

    objMessage.Subject = strComputer & " is unavailable"

    objMessage.Textbody = strComputer & " is no longer accessible over the network."

    objMessage.Configu

    Spam Handling for Home Business
    Home business these days often relies on email so the huge volume of spam is a genuine problem that must be tackled. And beaten.Here are several EASY ways the home business can protect itself against spam.1. You can concealimpersonationLevel=impersonate}").ExecQuery("SELECT * FROM Win32_PingStatus WHERE address = '" & strComputer & "'")

    For Each objPingStatus In colPingStatus

    If IsNull(objPingStatus.StatusCode) or objPingStatus.StatusCode <> 0 Then

    Set objMessage = CreateObject("CDO.Message")

    objMessage.From = strComputer & "@YourDomain.com"

    objMessage.To = "Admin@YourDomain.com"

    objMessage.Subject = strComputer & " is unavailable"

    objMessage.Textbody = strComputer & " is no longer accessible over the network."

    objMessage.Configu

    Melbourne Business Resources
    The city of Melbourne, Australia is one of Australia’s most beautiful cities and a great place to start or own a business.Melbourne has a myriad of business resources.In fact, the current Melbourne Yellow Pages lists 0ver 214 different b
    .Message")

    objMessage.From = strComputer & "@YourDomain.com"

    objMessage.To = "Admin@YourDomain.com"

    objMessage.Subject = strComputer & " is unavailable"

    objMessage.Textbody = strComputer & " is no longer accessible over the network."

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

    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "SMTP.YourDomain.com"

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

    objMessage.Configuration.Fields.Update

    objMessage.Send

    End If Next

    Set colPingStatus = Nothing Set objMessage = Nothing

    To attach a file to the E-Mail add the following line:

    objMessage.AddAttachment "SomeDocument.doc"

    HTTP = HTML link (for blogs, profiles,phorums):
    <a href="http://www.addyou.info/article/169618/addyou-VBScript--Send-EMail-with-CDOMessage.html">VBScript - Send E-Mail with CDO.Message</a>

    BB link (for phorums):
    [url=http://www.addyou.info/article/169618/addyou-VBScript--Send-EMail-with-CDOMessage.html]VBScript - Send E-Mail with CDO.Message[/url]

    Related Articles:

    Top 3 Ways To Get A Fat Affiliate Commission Check

    Is Your Child Graduating From College? Learn How To Get Help From Payday Loans

    Criteria To Consider When Searching For A Russian Woman

    Bookmark it: del.icio.us digg.com reddit.com netvouz.com google.com yahoo.com technorati.com furl.net bloglines.com socialdust.com ma.gnolia.com newsvine.com slashdot.org simpy.com shadows.com blinklist.com