It is very clear from your exception that it is trying to connect to localhost
and not to 10.101.3.229
exception snippet : Could not connect to SMTP host: localhost, port: 25;
1.) Please check if there are any null check which is setting localhost as default value
2.) After restarting, if it is working fine, then it means that only at first-run, the proper value is been taken from Properties and from next run the value is set to default. So keep the property-object as a singleton one and use it all-over your project