Java Mail not sending to Hotmail/Yahoo accounts

Posted on 2011-10-12
Last Modified: 2012-05-12
We have an email program which sends out emails correctly to internal addresses but when trying to send it to Hotmail, Yahoo account it gives us the following error

Relaying denied. IP name lookup failed

Any ideas ? We can send to these addresses from Outlook
Question by:abuyusuf35
    LVL 4

    Expert Comment

    by:Christopher Raymond Mendoza
    Have you checked the SMTP settings? Are they similar to Outlook's?

    Author Comment

    Is there something specific I need ?
    LVL 47

    Accepted Solution

    Maybe it has to do with some spam filtering on their side - they requiresometimes originating email to be reagistered.
    How about sending to - ?
    LVL 4

    Expert Comment

    by:Christopher Raymond Mendoza
    By my experience, the error message - 'Relaying denied. IP name lookup failed' - is sent back by the SMTP server.

    This may be due to a number of factors. The most common we have seen are:
    wrong credentials resulting to failed authentication

    Your Outlook seems to be configured right. If not, the same error would occur.

    Can you modify or at least view the SMTP settings (for outgoing mails) of Java Mail? And also check on the settings being used for Outlook?
    LVL 1

    Expert Comment

    Looks like your SMTP Server do not allow  relaying to other domains. Only internal mails it will distribute.
    You need to get a SMTP server  which supports relaying.Your ISP should be usually providing a SMTP server which supports relaying. Please check with your ISP or you need find an SMTP servers which support relaying.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now