Configure auto-reply (out of office) messages in Exchange and Microsoft 365. Ranjan.info

An automatic reply feature (Auto-Reply, Out of Office Messages/OOF) allows an Exchange user to configure a rule in their mailbox so that a specific message is automatically sent in response to all incoming e-mails Can you Typically, an auto-reply is enabled when a user is absent from the office for a long time (vacation, business trip, etc.). A user can self-configure an automatic reply via Outlook or Outlook on the web graphical interface. In this article, we will show how to enable, disable and configure an automatic reply message in Exchange Server 2019/2016/2013/2010 and Exchange Online (Microsoft 365) from the Exchange Admin Center (EAC) or by using PowerShell.

How to Enable Automatic Reply Messages in Exchange Server?

You can configure auto-reply to another user’s mailbox via the graphical Exchange Control Panel (ECP):

  1. Sign in to the Exchange Control Panel, click on your user icon in the top right and select another user;Exchange Control Panel - Connect another user mailbox
  2. Select the user mailbox for which you want to enable an automatic reply;
  3. Click Set up an automatic reply message,
    Set up an automatic reply (OOF) message
  4. Here you can enable OOF by checking send automatic reply options and setting a duration when you want auto-reply to be sent (Send reply only during this time period) then enter the text of the automatic reply message for users in your organization and the text for external users (Send an automated reply message to a sender outside my organization,
    Exchange Server - Set up automatic reply to another user
  5. Save changes and close OWA.

Now if you send an e-mail to a user mailbox, you will receive a message with the auto-reply text. please note that Only one reply is sent to each sender (If you send another e-mail to the same address, you will not receive the OOF message). This helps protect Exchange from e-mail loops.

In Exchange Server, you can configure an automatic reply by using Get-MailboxAutoReplyConfiguration And set-mailboxautoreplyConfiguration PowerShell Cmdlets.

Open Exchange Management Shell on your Exchange Server or connect to it remotely using PowerShell.

To enable automatic replies for a user mailbox, use the following PowerShell script:

$username="[email protected]"
$starttime = "10/17/2022 00:00:01"
$endtime = "10/21/2022 23:59:59"
$msg_internal ="Dear recipient, I am out of office from {Date} to {Date} due to {reason}. If you cannot wait, call me at {phone number}"
$msg_external ="Dear recipient, I am out of office from {Date} to {Date} due to {reason}. If you require immediate assistance, please contact {Name} at {Email}"
Set-MailboxAutoReplyConfiguration $username –AutoReplyState Scheduled –StartTime $starttime –EndTime $endtime InternalMessage $msg_internal -ExternalMessage $msg_external -ExternalAudience All

In this example, the automatic reply period (from October 17 to 21) was set. Internal users and external users in the Exchange organization will receive OOF messages separately.

To disable automatic reply for user mailboxes, run the following:

Set-MailboxAutoReplyConfiguration [email protected] –AutoReplyState Disabled –ExternalMessage $null –InternalMessage $null

You can additionally configure the automatic forwarding of all incoming e-mails to a specific e-mail address:

Set-Mailbox [email protected] -ForwardingAddress [email protected] -DeliverToMailboxAndForward $true

[alert]To disable email auto-forwarding:

Set-Mailbox [email protected] -ForwardingSmtpAddress $null

To check if auto-reply is enabled for the user and display the current OOF message, run the command below:

Get-MailboxAutoReplyConfiguration [email protected]

To get a list of all mailboxes in an organization with auto-reply enabled:

Get-Mailbox | Get-MailboxAutoReplyConfiguration | Where-Object {$_.AutoReplyState –eq "scheduled"} | fl identity,MailboxOwnerId,AutoReplyState,StartTime,EndTime

If you want to find users with permanent auto-responders, replace scheduled with capable,

Comment. You can delegate the auto-responder configuration to other non-administrative Exchange accounts. To do this, assign them mail recipient And user options roles.

Configuring Out of Office Messages in Microsoft 365 (Exchange Online)

In Exchange Online (Microsoft 365), you can also enable automatic replies for user mailboxes.

You can enable OOF through Exchange Admin Center (https://admin.exchange.microsoft.com/,

  1. Go to Recipients -> Mailboxes;
  2. Select a mailbox;
  3. In the Mailbox Properties window, click other Tab and select Automatic Reply -> Manage Automatic Replies,
    Manage Automatic Replies - Microsoft 365 Mailbox
  4. In the next window, you can enable an automatic reply and enter a reply text for internal and external senders.
    Manage automatic replies in Exchnage Online

Note that you cannot schedule an out-of-office period in the Microsoft 365 admin center.

In Exchange Online (Microsoft 365), you can also configure auto-responder for mailboxes by using PowerShell. Same command is used as for Exchange Server (Get-MailboxAutoReplyConfiguration And set-mailboxautoreplyConfiguration,

Connect to your Exchange Online tenant using the EXOv2 PowerShell module:

Connect-ExchangeOnline

To enable automatic reply:

Set-MailboxAutoReplyConfiguration -Identity b.hoffmann -AutoReplyState Enabled -InternalMessage "Internal autoreply message text" -ExternalMessage "External autoreply message text"

To list the current auto-reply settings for a mailbox:

Get-MailboxAutoReplyConfiguration -Identity b.hoffmann

Set-MailboxAutoReplyConfiguration - Configure Office Messaging with PowerShell in Microsoft 365

To disable OOF:

Set-MailboxAutoReplyConfiguration -Identity b.hoffmann -AutoReplyState Disabled

Microsoft 365 has some additional auto-reply options that you can set using set-mailboxautoreplyConfiguration cmdlet:

  • -AutoDeclineFutureRequestsWhenOOF $true – Decline all meeting requests when OOF is activated;
  • -DeclineAllEventsForScheduledOOF $true – Decline all approved events scheduled for out-of-office periods;
  • -DeclineMeetingMessage – set the message text to the meeting organizer if it is configured by one of the previous options;
  • -CreateOOFEvent $true – Create calendar events for the OOF period. This will make it easier for meeting organizers to use the scheduling assistant;
  • -OOFEventSubject – Set an OOF event subject to be displayed in Outlook Calendar.
If you want to use more complex auto-reply scenarios (forwarding, conditional reply, etc.), you can use Exchange Inbox rules.

Leave a Comment