Changing the senders hostname for Java Mail

by Wolfram Saringer  (2013-03-27)
last change: 2013-03-27


Add the following property to your mail configuration, substituting the correct name for my.mail.hostname.com:

properties.put("mail.smtp.localhost", "my.mail.hostname.com");


all articles represent the sole opinion of their respective author. all content comes without any warranty for correctnes, despite due diligence.