I am trying to configure Logback to send emails whenever an exception (Logging level: ERROR) occurs. I have not been able to make it work so far so I would like to ask for y
Default entry for port in smtpappender is 25, gmail is using authentication for smtp services, and you need use ports 587 for TLS and 465 for SSL.
I would say this might be your problem.
Try to setup mail server on your local machine first without authentication, and try is your appended works. then try to find how to configure it for gmail.
From page http://logback.qos.ch/manual/appenders.html#gmailSTARTTLS
smtp.gmail.com
587
true
YOUR_USERNAME@gmail.com
YOUR_GMAIL_xPASSWORD
EMAIL-DESTINATION
ANOTHER_EMAIL_DESTINATION
YOUR_USERNAME@gmail.com
TESTING: %logger{20} - %m
%date %-5level %logger - %message%n