2 sonuçtan 1 ile 2 arası

Konu: exc.2000 de yeni açılan kullanıcılara oto mail gönderilmesi

  1. #1

    Standart exc.2000 de yeni açılan kullanıcılara oto mail gönderilmesi

    exchange 2000 kullanmaktayız ve yeni açılan kullanıcılara otomatik mail gitmesini gerekiyor. (hotmaildeki hoşgeldiniz maili gibi) Bunu nasıl yapabilirim fikirlerinizi bekliyorum. İyi Çalışmalar...
     

  2. #2

    Standart Ynt: exc.2000 de yeni açılan kullanıcılara oto mail gönderilmesi

    Merhaba,

    Asagidaki script bir kac ufak degisiklikten sonra isinize yarayacaktir,

    Dim StrDate, CurrentUTC

    'Create the current date and time stamp for query for day before last
    CurrentUTC = DatePart("yyyy", Date)
    'now add Month in mm if only M add leading 0
    if DatePart("m" , Now) < 10 then
    CurrentUTC = CurrentUTC & 0 & DatePart("m" , Now)
    else
    CurrentUTC = CurrentUTC & DatePart("m" , Now)
    end if
    'now add Day in dd if only d add leading 0
    if DatePart("d" , Now) < 10 then
    'OPTIONAL - FOR MANY DAYS, replace line below with CurrentUTC = CurrentUTC & 0 & DatePart("d" , Now - X) where X = # of days

    CurrentUTC = CurrentUTC & 0 & DatePart("d" , Now)
    else
    'OPTIONAL - FOR MANY DAYS, replace line below with CurrentUTC = CurrentUTC & DatePart("d" , Now - X) where X = # of days
    CurrentUTC = CurrentUTC & DatePart("d" , Now)
    end if
    ' Tag hour, minute, second on
    strDate = CurrentUTC&"000001.0Z"

    'Create AD Connection
    Set oConnection1 = CreateObject("ADODB.Connection&quot
    Set oCommand1 = CreateObject("ADODB.Command&quot
    oConnection1.Provider = "ADsDSOObject" ' This is the ADSI OLE-DB provider name
    oConnection1.Open "Active Directory Provider"
    ' Create a command object for this connection.
    Set oCommand1.ActiveConnection = oConnection1
    'Set Query definition

    oCommand1.CommandText = "select mail from 'LDAP://DC=Fabrikam, DC=com' WHERE objectCategory='Person' AND objectClass='user'AND msExchHideFromAddressLists<>'True' AND whenCreated>='" & strDate & "'"

    oCommand1.Properties("Page Size&quot = 30000
    ' Execute the query.
    Set rs = oCommand1.Execute


    rs.movefirst
    'Create the loop of results
    Do Until rs.EOF = True

    'Create Email
    Set objEmail = CreateObject("CDO.Message&quot
    objEmail.From = "Admin@fabrikam.com"
    objEmail.To = rs.Fields("mail&quot
    'Optional BCC field
    'objEmail.BCC = "Admin@fabrikam.com"
    objEmail.Subject = "A welcome message from Exchange"
    objEmail.HTMLbody = "Welcome to Fabrikam. Please click on the attached file for a message."

    'Optional Add an attachment
    objEmail.AddAttachment "C:\new_hire_audio_message.wav"


    objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/con...tion/sendusing &quot = 2
    objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/con...ion/smtpserver &quot = _
    "ExchangeServer" 'Replace ExchangeServer with server IP or name
    objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/con...smtpserverport &quot = 25
    objEmail.Configuration.Fields.Update

    'Optional - Read the message before it's sent
    'MsgBox objEmail.GetStream.ReadText
    objEmail.Send
    rs.movenext
    Loop

    'Close AD Connection
    oConnection1.close


    Emre AYDIN
    Emre Aydın
    MVP | Office 365 | Since 2006
    MCT | Since 2005
    MCSD | Azure Solutions Architect
    MCSE | Private Cloud, Messaging, Communication, Server Infrastructure, Productivity, Platform
    MCSA | Office 365, Server 2012, Cloud Platform
    MCTS | Developing Azure Solutions, Implementing Azure Infrastructure, Architecting Microsoft Azure Solutions, SAM
    P-Seller
    Intelligent Cloud | EMS
    Web : www.mshowto.org
    Mail : emre.aydin [@] mshowto.org
    Twitter : https://twitter.com/emreaydn
    Linkedin : tr.linkedin.com/in/emreaydn

Benzer Konular

  1. Cevaplar: 1
    Son Mesaj: 06-18-2015, 02:00 PM
  2. Kullanıcılara Doğum Günlerinde Otomatik Mail
    By emreaydin in forum Exchange Server
    Cevaplar: 3
    Son Mesaj: 10-15-2012, 11:56 PM
  3. Cevaplar: 2
    Son Mesaj: 05-08-2007, 05:23 PM
  4. Cevaplar: 1
    Son Mesaj: 12-25-2006, 12:40 PM

Yetkileriniz

  • Konu Açma Yetkiniz Yok
  • Cevap Yazma Yetkiniz Yok
  • Eklenti Yükleme Yetkiniz Yok
  • Mesajınızı Değiştirme Yetkiniz Yok
  •  
Hakkımızda
MSHOWTO, herhangi bir firma ya da kuruluş ile bağı olmayan bağımsız teknik bir topluluktur.
Sosyal Medya Linklerimiz