Autoresponder for Exchange 2003
HiHow to set autoresponder in exchange 2003.Can it be set for each mailbox and can respond to all incoming message (both internal & external)Like autoresponse when a user is on vacation or autoreplies when a mail is sent to info@domain.com etc.ThanksHarpreet
September 15th, 2008 3:31pm

Hi, You can use Outlook to make auto replies. In order for this to work externally you must allow this in system manager - global settings | Internet message formats | properties of default. Leif
Free Windows Admin Tool Kit Click here and download it now
September 15th, 2008 3:54pm

Hi Harpreet, Yep, you can set auto reply rules. Automatically reply to messages http://office.microsoft.com/en-us/outlook/HA102487481033.aspx Make sure that you have enabled below options in Internet Message Formats of Global Settings. Allow out of office responsesAllow automatic repliesAllow automatic forward You cannot restrict certain automatic responses to the Internet based on administrative groups in Exchange 2000 Server or in Exchange Server 2003 http://support.microsoft.com/kb/840158
September 15th, 2008 4:04pm

Hi Thanks for your help. I am getting autoreply like thisin the subject Out of Office AutoReply: (Subject) Can it be changed like only original subject would be there and this Out of Office AutoReply: can be removed. . Harpreet
Free Windows Admin Tool Kit Click here and download it now
September 26th, 2008 9:58am

Hello Harpreet, You need to remove the Out of Office AutoReply: from the subject line of your template which you set in step 1 of below article. http://office.microsoft.com/en-us/outlook/HA102487481033.aspx
September 26th, 2008 10:04am

HiHow to create template for outlook 2003Will this also work when outlook is not running
Free Windows Admin Tool Kit Click here and download it now
October 1st, 2008 9:38am

Is therea way to have an email stop receiving messages but send out something other than the default this email address is not valid message?
October 31st, 2008 6:16pm

yes, dear there is a way to set up autoresponder with any information you need and also to adjust time frames of sending it plus you can set up a loop protetion but we are talking here about solution for exchange server 2007/2010.
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2011 6:29am

Hi Harpreet, I do have autoreply Event script which I had modified long back: My company had fired 1000 Sales force people and wanted to implement a solution like below 1. upon recieving mail in any of these 1000 mailbox -> Mail will be forwarded to a maibox called "autoreply". 2. "AutoReply" mailbox will be replying to the mail with text which includes recipeint mailbox is not exist and alternate contact details were mentioned. This reply should go every time sender sends it to recipient even if it is different message. Solution: We enabled Microsoft Exchange Event service on one exchange server and configured this autoreply Event script on one mailbox. Please let me know if you looking for similar solution. Regards, Manish =============================================================================== <SCRIPT RunAt=Server Language=VBScript> '------------------------------------------------------------------------------ 'FILE DESCRIPTION: Exchange Server Event Script '------------------------------------------------------------------------------ Option Explicit '------------------------------------------------------------------------------ ' Global Variables '------------------------------------------------------------------------------ Dim straltRecBL Dim strBase Dim strdomainBase Dim strUserdn Dim strUserMail Dim valFound '------------------------------------------------------------------------------ ' Event Handlers '------------------------------------------------------------------------------ ' DESCRIPTION: This event is fired when a new message is added to the folder Public Sub Folder_OnMessageCreated() On Error Resume Next Dim strReplyMessage ' Contents of Reply Message Err.Clear strBase = "" '-------------------------------------------------------------------------------------------------------------------- strBase = "LDAP://CN=Testdomain Sales Teams,OU=Users,OU=CAN,OU=IND,OU=EUR,DC=dir,DC=Testdomain,DC=com" 'Value needs to be set 'strBase = "LDAP://CN=DVCEN005,OU=Users,OU=CAN,OU=IND,OU=EUR,DC=dir,DC=Testdomain,DC=com" '-------------------------------------------------------------------------------------------------------------------- Call get_altBL If Err.Number <> 0 Then Log "Error Occured Querying Active Directory" Else Log "altRecipientBL attribute Values Collected" End If Err.Clear strReplyMessage = vbNewLine & "The mailbox to which you have sent this message is now disabled and your mail is not forwarded. " strReplyMessage = strReplyMessage & vbNewLine strReplyMessage = strReplyMessage & vbNewLine & "If you wish to get in touch with TestdomainAsia-Pacific, please send your message directly to" strReplyMessage = strReplyMessage & vbNewLine & "Rock Simon (Rock Simon@Testdomain.com) or Girdhar Rajesh (girdhar.rajesh@Testdomain.com)." strReplyMessage = strReplyMessage & vbNewLine strReplyMessage = strReplyMessage & vbNewLine strReplyMessage = strReplyMessage & vbNewLine & "For Testdomain Africa-Middle East, please send your message to Ashwini kumar (Ashwini.kumar@Testdomain.com)." strReplyMessage = strReplyMessage & vbNewLine strReplyMessage = strReplyMessage & vbNewLine strReplyMessage = strReplyMessage & vbNewLine & "For Testdomain Latin America, please send your message to Manish Girdhar (Manish.Girdhar@Testdomain.com)." strReplyMessage = strReplyMessage & vbNewLine strReplyMessage = strReplyMessage & vbNewLine strReplyMessage = strReplyMessage & vbNewLine strReplyMessage = strReplyMessage & vbNewLine & "--------------------------------------------------------------" '============================================================================ ' DESCRIPTION: This event is fired when a new message is added to the folder ' NOTE: Extensive Logging is enabled for demonstration purposes only '============================================================================= ' Local Variables ------------------------------------------------ Dim Struserfound Dim strexist Dim Chktype Dim iFolder Dim iMessage Dim cdoSession Dim oContactItem Dim oReply Dim oReplymessage Dim cSubject Dim cType Dim StrMessageBody Dim oRecipients Dim oRecipient Dim strRecipient strRecipient = "" Dim chkerr Chktype = True Log "The OnMessageCreated Event Fired" ' Load the Intrinsic objects into local vars '=========================================== iFolder = EventDetails.FolderID iMessage = EventDetails.MessageID Set cdoSession = EventDetails.Session Err.Clear Set oContactItem = cdoSession.GetMessage(iMessage, Null) 'Get message which caused event to be fired If Err.Number <> 0 Then 'First If *** 1 Log "Error getting oContactItem, Error number: <" & Err.Number & ">" Else cSubject = oContactItem.Subject '''''''''''''''''''''''''''' Check for message type '------------------------------------ Filter Log "Message processed with Subject line: <" & cSubject & ">" cType = oContactItem.Type If cType = "REPORT.IPM.Note.NDR" Or cType = "REPORT.IPM.Note.DR" Or cType = "IPM.Note.Rules.Oof.Template.MicrosoftMessage" Then Log "Status Message, Message type. " & cType Chktype = False oContactItem.Delete ElseIf cType = "IPM.Schedule.Meeting.Request" Then Log "Status Message, Message type. " & cType Chktype = True End If '----------------------------------------------- ' ----------------------- Filter Key words in message body Log "Checking for Keywords...." Dim chkNotReply Dim noNotReply noNotReply = False If Chktype = True Then chkNotReply = InStr(oContactItem.Text, "abc-defg1234569") If chknotreply <> 0 Then oContactItem.Delete 'Delete original Message from Message Store noNotReply = False If Err.Number <> 0 Then Log "Error During Original Message delete. Error: [" & Err.Number & "] " & Err.Description Else Log "Deleted Original Message from Message store... not reply was found <" & cSubject & " >" End If '------------------ remove if no error was found Else noNotReply = True End If End If If noNotReply = True And Chktype = True Then 'Second if *** 2 Log "Condition True" & " Message Type: <" & cType & ">" & " Creating Reply...." '----------------------Get recipient of original Message Err.Clear Set oRecipients = oContactItem.Recipients If Err.Number = 0 Then 'Third if *** 3 For Each oRecipient In oRecipients ' Create a list of recipients of original message If strRecipient <> "" Then strRecipient = strRecipient & "; " & oRecipient.Name Else strRecipient = oRecipient.Name End If Call get_Dn(oRecipient.Name) If valFound = "True" Then strexist = InStr(straltRecBL, strUserdn) ' Check if Dn is exists in the list of altRecipientBL attribute If strexist <> 0 Then Struserfound = Struserfound & vbNewLine & oRecipient.Name & " (Email Address: " & strUserMail & ")" End If ElseIf valFound = "Multi" Then Struserfound = Struserfound & vbNewLine & oRecipient.Name End If valFound = "" Next Else Log "Error Occured During Getting Recipients, Error number is: " & Err.Number & " | Error Description: " & Err.Description strRecipient = cdoSession.CurrentUser End If 'Third if ccc 3 '---------------------------------------- Err.Clear Set oReply = oContactItem.Reply() If Err.Number <> 0 Then Log "During Reply Message Creation( set oReply) . Error: [" & Err.Number & "] " & Err.Description End If Struserfound = vbNewLine & "Below Mentioned Mailbox / Mailboxes are disabled: " & vbNewLine & " " & Struserfound Struserfound = Struserfound & vbNewLine & "--------------------------------------------------------------" Struserfound = Struserfound & vbNewLine Struserfound = Struserfound & vbNewLine Struserfound = Struserfound & vbNewLine & "Thank you " StrMessageBody = vbTab & vbNewLine & "-----------------Original Message------------------" StrMessageBody = StrMessageBody & vbNewLine & "From: " & oContactItem.sender StrMessageBody = StrMessageBody & vbNewLine & "Sent: " & oContactItem.TimeReceived & " CET" 'Value of time zone need to be set StrMessageBody = StrMessageBody & vbNewLine & "To: " & strRecipient StrMessageBody = StrMessageBody & vbNewLine & "Subject: " & cSubject & vbNewLine oReplymessage = strReplyMessage & vbNewLine & Struserfound & vbNewLine ' Compose text of reply message oReplymessage = oReplymessage & vbNewLine & StrMessageBody '& oContactItem.Text ' if original text is required oReply.Text = oReplymessage ' Put Reply Text into Reply message If Left(UCase(cSubject), 3) <> "RE:" Then oReply.Subject = "RE:" & cSubject Else oReply.Subject = cSubject 'Set Subject of reply message End If Err.Clear oReply.Update 'Update reply Message If Err.Number <> 0 Then Log "During Reply Message update. Error: [" & Err.Number & "] " & Err.Description End If Err.Clear oReply.send 'Send Message reply If Err.Number <> 0 Then Log "During Reply Message Sent. Error: [" & Err.Number & "] " & Err.Description Else Log "Message Sent .... " End If '------------------ Deleting Original mail if no was error found Err.Clear chkerr = InStr(script.Response, "Error") If chkerr <> 0 Then Else oContactItem.Delete 'Delete original Message from Message Store noNotReply = False If Err.Number <> 0 Then Log "Error During Original Message delete. Error: [" & Err.Number & "] " & Err.Description Else Log "Deleted Original Message from Message store... " End If End If '------------------------------------------------------------------- '--------------------------------- Send debug Mail if any error occured--------- Dim finderr finderr = InStr(script.Response, "Error") If finderr <> 0 Then Dim svr Dim sendr Dim rest Dim subt Dim mese svr = "smtpappbra.dir.Testdomain.com" ' Value required to be changed sendr = "autoreplyscript@Testdomain.com" rest = "domain.operation@Testdomain.com" ' Value required to be changed subt = "Error in AutoReply script found" mese = "Check logs below for more details: " & vbNewLine & script.Response Call SendEmail(svr, sendr, rest, subt, mese) End If '-------------------------------------- Set iFolder = Nothing Set iMessage = Nothing Set cdoSession = Nothing Set oContactItem = Nothing Set oReply = Nothing cSubject = "" cType = "" Set oRecipients = Nothing Set oRecipient = Nothing strRecipient = "" End If 'Second if CCC 2 End If 'First If ccc 1 End Sub ' DESCRIPTION: This event is fired when a message in the folder is changed Public Sub Message_OnChange() End Sub ' DESCRIPTION: This event is fired when a message is deleted from the folder Public Sub Folder_OnMessageDeleted() End Sub ' DESCRIPTION: This event is fired when the timer on the folder expires Public Sub Folder_OnTimer() End Sub Public Sub Log(sMessage) ' Collect the Logged Messages in Script.Response Object ' Adding the correct formatting script.Response = script.Response & vbNewLine & Now & vbTab & sMessage End Sub Public Sub get_altBL() On Error Resume Next Err.Clear Dim oUser Dim altRecBL Set oUser = GetObject(strBase) Dim c1 c1 = 0 For Each altRecBL In oUser.GetEx("altRecipientBL") If c1 = 0 Then straltRecBL = altRecBL Else straltRecBL = straltRecBL & "|" & altRecBL End If c1 = c1 + 1 Next Set oUser = Nothing If Err.Number <> 0 Then Log "Error Occured during execution of Get_dn (ALTBL), Error Number" & Err.Number & " , " & Err.Description End If End Sub Public Sub get_Dn(strDispname) On Error Resume Next Err.Clear strUserdn = "" valFound = "False" '-------------------------------------------------------------------- strdomainBase = "DC=dir,DC=Testdomain,DC=com" 'Value needs to be set '-------------------------------------------------------------------- Dim strFilter, strAttributes Dim strcmd, objuser, objConnection, objCommand, objRecordset, objRootDSE Dim strBase1 Set objCommand = CreateObject("ADODB.Command") Set objConnection = CreateObject("ADODB.Connection") objConnection.Open "Provider=ADsDSOObject;" objCommand.ActiveConnection = objConnection Set objRootDSE = GetObject("LDAP://RootDSE") strBase1 = "<LDAP://" & strdomainBase & ">" strFilter = "(&(objectCategory=person)(objectClass=user)(displayName=" & strDispname & "))" ' Comma delimited list of attribute values to retrieve. strAttributes = "distinguishedName,mail" strcmd = strBase1 & ";" & strFilter & ";" & strAttributes & ";subtree" If Err.Number <> 0 Then Log "Error Occured during execution Flag 2 (Get_dn) , Error Number " & Err.Number & " , " & Err.Description & " | Strcmd: " & strcmd End If err.clear objCommand.CommandText = strcmd objCommand.Properties("Page Size") = 10000 objCommand.Properties("Timeout") = 30 objCommand.Properties("Cache Results") = True Set objRecordset = objCommand.Execute If Err.Number <> 0 Then Log "Error Occured, Flag get_Dn (1) Error Number " & Err.Number & " , " & Err.Description End If err.clear If objRecordset.RecordCount = 0 Then ElseIf objRecordset.RecordCount = 1 Then strUserdn = objRecordset.Fields("distinguishedName").Value strUserMail = objRecordset.Fields("mail").Value valFound = "True" Else Log "Multiple values found... Get Dn: " & strDispname valFound = "Multi" End If If Err.Number <> 0 Then Log "Error Occured during execution of Get_dn for: " & strDispname & ", Error Number " & Err.Number & " , " & Err.Description End If End Sub Public Sub SendEmail(Server, sndr, rcpt, subj, msg) On Error Resume Next Err.Clear Dim iMsg, iConf, Flds ' Set the visual basic constants as they do not exist within VBScript. ' Do not set your smtp server information here. Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing" Const cdoSendUsingPort = 2 Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver" Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields ' SMTP server configuration. With Flds .Item(cdoSendUsingMethod) = cdoSendUsingPort ' Set the SMTP server address here. .Item(cdoSMTPServer) = Server .Update End With ' Set the message properties. With iMsg Set .Configuration = iConf .To = rcpt ' .CC = rcpt .From = sndr .Subject = subj End With If InStr(UCase(msg), "<HTML>") Then iMsg.HTMLBody = msg Else iMsg.TextBody = msg End If ' Send the message. iMsg.send If Err.Number <> 0 Then Log "Error Sending Debug mail, Error number " & Err.Number & " | Description : " & Err.Description End If End Sub </SCRIPT>
May 18th, 2011 7:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics