The mail system may be set up to automatically respond to incoming mail with a specific message.
This is done using the vacation program.
Its use is well in the vacation man page, and the implementation is left as an exercise.
Note that it is not recommented to use if you are a member of a listserv or of a mailing list.