I have written a small Java program to try to get log4j + SMTPAppender to log an error and send me an email when my program throws an exception. The exception is being correctly logged but no mail is being sent.
I have tested my program to see if it sends mail and it does - just not via log4j. I am using a log4j.properties file to configure the logging.
Have any of you any ideas why my email is not being sent when I throw an exception? Here is my log4j.properties file: