Skip to main content

Blarg#8: A stupid user trick for goggle to cache

Posted by jfalkner on October 11, 2004 at 2:27 PM PDT

Java's platform independence is great, except when, 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

        at com.sun.mail.smtp.SMTPTransport.issueCommand(
        at com.sun.mail.smtp.SMTPTransport.helo(
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(
        at javax.mail.Service.connect(
        at javax.mail.Service.connect(
        at org.proteomecommons.EmailTools.main(

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 " Computer" to /etc/hosts (or echo " Computer" >> /etc/hosts).

Run the code again and you are set.