Posted by jfalkner
on October 11, 2004 at 2:27 PM PDT
Java's platform independence is great, except when it...er, the user doesn't work. Here is something for goggle to cache. Long live copy/paste coding!
Java's platform independence is great, except when it...er, the user doesn't work. Take for instance JavaMail. The API is great. Who doesn't love the ability to send e-mail, and few other simple programming tricks can make your boss ooh and ah like a customized e-mail.
If you are using linux and get the following, very-google-cachable exception.
javax.mail.MessagingException: 501 5.0.0 HELO requires domain address
You'd be out of luck. Until now that is. The problem is as simple as translating your computer's IP address to a name. Just add the appropriate entry in /etc/hosts that converts your computer's IP to its hostname. For example, if your hostname is "Computer" (if you don't know type cat /etc/hostname), add "127.0.0.1 Computer" to /etc/hosts (or echo "127.0.0.1 Computer" >> /etc/hosts).
Run the code again and you are set.