Setting 'mail.smtp.localhost' to make things work
843830Jan 30 2004 — edited Jan 31 2004Hello
I was getting this error with my initial attempts to send myself an email using JavaMail:
javax.mail.MessagingException: 501 Syntactically invalid HELO argument(s)
After hunting around for a while I came across references to doing this:
props.put( "mail.smtp.localhost", "localhost" )
So I tried it, and it works!
I'm happy about that, but I would like to find out why? I just cannot seem to find an answer anywhere.
I run Windows XP, and my hosts file has not been changed - localhost is still there, as shipped. When I call this:
InetAddress.getLocalHost().getHostName()
I get the $COMPUTERNAME value for my PC which happenes to be "HARRY_PC".
My real concern is what will happen when I deploy my application to other machines - is this little 'hack' likely to break things?
Hmm...
Many thanks!
Harry Mantheakis
London, UK