I'm getting my Session with Session.getDefaultInstance and its not getting changes to the Properties passed in. What's wrong?

John Zukowski

In getDefaultInstance(Properties props), the Properties are only used in the initial call. Future calls ignore the setting, returning the previously created Session. If you need to change the Properties, like to change SMTP servers, you should use getInstance(Properties props) instead.