In Mail, open the Get Account Info window
With the Mailbox List visible on the left side, expand the Inbox folder by clicking the expansion triangle (1). Right Click on your mailbox (2) and choose Get Account Info (3) (Note-- if your mailbox list is not visible, use the View menu and click on View Mailbox List to reveal it)
Turn on "Send Out of Office replies"
In the Account Info dialog box, with the appropriate Account selected (eg: Exchange) put a check mark in "Send Out of Office replies". Set the Starting time, Ending time and the messages for Internal and External Replies. Note that in most cases, the External Reply is the most important.