Solved

javax.mail.SendFailedException: 554 Relay rejected for policy reasons

Posted on 2011-09-13
5
1,578 Views
Last Modified: 2012-05-12
I'm getting the following error when trying to send emails externally from within my organization.  Any ideas what might be causing this?

javax.mail.SendFailedException: 554 Relay rejected for policy reasons

Thanks in advance!
0
Comment
Question by:nightshadz
5 Comments
 
LVL 19

Assisted Solution

by:ramazanyich
ramazanyich earned 100 total points
ID: 36534163
Depending on your from and To headers mail server can reject your mail. For example if domain name is not in the range of accepted domains on server
0
 
LVL 13

Assisted Solution

by:George K.
George K. earned 100 total points
ID: 36534193
Seems like email server configuration problem in order to accept accept relay.

Email server should be configured - make a rule - to allow relay fro specific server.
0
 
LVL 27

Accepted Solution

by:
mrcoffee365 earned 300 total points
ID: 36534198
Lots of conditions cause that response.  Basically, the email server you're using is not allowing you to send email.   I assume you're using the corporate mail server?  You should check that it allows people to send mail out .  Relay should be turned off, of course, and presumably you're accessing it correctly so that you're not sending relay email.  If you are doing something to send outgoing email over port 25, sometimes that is turned off by default.  I have heard that ISPs in China frequently don't have SMTP servers, which for some reason results in the 554 error (it should give another error, but mail servers are notorious for being inconsistent with standards).

I have to say that usually this is not a problem if you are using a legitimate user on the mail server (with password) in order to send email.

If you are in a situation where you believe you need to send email using relay, then your corporate server can be configured to allow relay from the specific server from which you're trying to send email.

If you don't understand any of this, post your code and we'll try to help you.
0
 

Author Comment

by:nightshadz
ID: 36536068
It's part of an HR application that is set up to send automated emails externally to candidates that are applying for a job.  I talked to another department and the mail server needs to be set up to allow messages to go out to the internet.  Thanks for the responses!
0
 
LVL 27

Expert Comment

by:mrcoffee365
ID: 36536861
Great -- good luck!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
topping1 challenge 7 73
groovy example issue 10 90
GUI builder for Eclipse? 8 27
configure dependency in POM for new database 3 17
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.

920 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

16 Experts available now in Live!

Get 1:1 Help Now