You could create a message rule to respond, but that means leaving the
computer running while you are away.
The best way is to turn on a vacation reply on the email account's server.
Most have this option, which you can access via the webmail portal.