You can set your out of office from your iPhone as follows:
- Go to Settings > Accounts & Passwords > Choose Your work account
- At the bottom of the page tap Automatic Reply
Be sure to set both the internal and external (scroll down) message. When you set an end date the message text will be updated with that date automatically, or you can write a custom message.