I would like to change the email subject before the program exists now I was able to do it by replacing the Email appender with a new one in the script as shown in the method below. I want to know if its possible to get the existing appender and modify its properties instead of replacing it.
Sure it is possible -- the docs/faq even explain how -- but this is not the solution you're looking for :)
If you want different emails to get info messages based on something in your code, use a dedicated category/logger like you're supposed want to