JavaMail SMTP-host error

It looks as though the solution is to put the "mail.smtp.localhost"-value to the same value as for "mail.smtp.host". Not one single mail has failed since I put that property in. I don't think it was an obvious property to set and an ignorance from my point of view, nevertheless, I hope this will help someone else in the future.

JavaMail SMTP-host error

It looks as though the solution is to put the "mail.smtp.localhost"-value to the same value as for "mail.smtp.host". Not one single mail has failed since I put that property in. I don't think it was an obvious property to set and an ignorance from my point of view, nevertheless, I hope this will help someone else in the future.

So, my properties are as follows:

    Properties props = new Properties();

    props.setProperty("mail.store.protocol", "pop3")
    props.setProperty("mail.pop3.host", "mail.xxxxxxx.com")
    props.setProperty("mail.pop3.port", "110")
    props.setProperty("mail.smtp.localhost", "mail.xxxxxxx.com")
    props.setProperty("mail.smtp.host", "mail.xxxxxxx.com")
    props.setProperty("mail.smtp.port", "25")
    props.setProperty("mail.smtp.sendpartial", "true")
    props.setProperty("mail.pop3.socketFactory.port", "110")
    props.setProperty("mail.pop3.socketFactory.class","javax.net.SocketFactory")
    props.setProperty("mail.pop3.socketFactory.fallback", "false")

Setting the value of "mail.smtp.host" to the property "mail.smtp.localhost"