Exchange 2008 - Welcome email

Posted on 2011-10-04
Last Modified: 2014-02-07
I have seen many of these, but non related to Exchange 2008.  I have been told that in 2008 this functionality is not available and it has to be scripted.  What I am looking for is an email to be autogenerated for every new account that is set in AD.  We will put the appropriate welcome content in this email.  Does anyone know if we can do this natively or where a powershell script or other could be found?
Question by:jeffnorem
    LVL 23

    Accepted Solution

    I Hvae used this script in the past

    Dim objConnection, objCommand, objRecordSet, objRootDSE, objMessage

    Set objConnection = CreateObject("ADODB.Connection")
    objConnection.Provider = "ADsDSOObject"
    objConnection.Open "Active Directory Provider"

    Set objCommand = CreateObject("ADODB.Command")
    objCommand.ActiveConnection = objConnection

    Set objRootDSE = GetObject("LDAP://RootDSE")
    objCommand.CommandText = _
     "Select name,mail,whencreated  from 'LDAP://ou=staff,ou=Accounts,dc=domain,dc=com'"
    Set objRootDSE = Nothing

    objCommand.Properties("Page Size") = 10000
    objCommand.Properties("Timeout") = 600
    objCommand.Properties("Cache Results") = False

    Set objRecordSet = objCommand.Execute

    While Not objRecordSet.EOF

    If StrComp(Left(objRecordSet.Fields("whencreated"), 10), Date-2) = 0 Then
    Set objMessage = CreateObject("CDO.Message")
    objMessage.from = ""
    objMessage.To = objRecordSet.Fields("mail")
    objMessage.subject = "Welcome to Comapny"
    objMessage.TextBody = BodyText
    objMessage.CreateMHTMLBody "file://G:\Welcome.htm"

    objMessage.Configuration.Fields.Item("") = 2  
    objMessage.Configuration.Fields.Item("") = "Ip Address of exchange server"
    objMessage.Configuration.Fields.Item(" ") = 25

    End If


    Set objRecordSet = Nothing
    Set objCommand = Nothing
    Set objConnection = Nothing
    LVL 26

    Assisted Solution

    Just a clarification is that Exchange 2008?


    Author Comment

    Sorry, Fat fingered... 2007

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Set OWA language and time zone in Exchange for individuals, all users or per database.
    The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
    The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now