• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1888
  • Last Modified:

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

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
nightshadz
Asked:
nightshadz
3 Solutions
 
ramazanyichCommented:
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
 
George K.Commented:
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
 
mrcoffee365Commented:
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
 
nightshadzAuthor Commented:
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
 
mrcoffee365Commented:
Great -- good luck!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now