WebStart and JavaMail -- unable to relay
Hi
I have an application that I can run from the command line that can successfully send email using JavaMail.
I package the app up for WebStart and run it on the same machine, when I send the mail using JavaMail I get a 550 error:
class com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected];Any ideas? My mail.jar and activation.jar are specified in my JNLP file for my app as an extension (as they are signed already)...
Has anyone seen this?
Thx,
Mark
er no
I run my app from a command shell on XP and sendimg mail via our Exchange server works fine on my development machine.
I run the SAME app using a WebStart based installation on the same machine as per the command shell run, with the installation downloaded from a webserver on the same machine and when the piece of code that sends a mail is invoked I get the UNable to relay error..
Why would it work from the command shell and not from WebStart...
Mark
Similar Messages
-
Evaluating debug src, and 'Unable to relay for ...'
hello.
i wanted to know if there is any possibility to evaluate the string that is returned using debug mode in javamail. for example to know wheter conn to mailserver was ok. wether sender or recipient was ok and so on.so that i can (for example) build in some if-clauses to stop (and give a mesage to the current user 'conn failed') or retry some processes.
my second question is, that i sometimes get an error sending mails. the app is running on a tomcat server (localhost). after restarting the tomcat, it works again. after a while (2 or 3 days) it gives me the error message again ('Unable to relay for')here is my exception:
###################### debug/exception start ######################
DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG: SMTPTransport trying to connect to host "localhost", port 25
DEBUG SMTP RCVD: 220 ffmserver.mailabc.local Microsoft ESMTP MAIL Service,
Version: 5.0.2195.6713 ready at Mon, 3 Apr 2006 13:17:02 +0200
DEBUG: SMTPTransport connected to host "localhost", port: 25
DEBUG SMTP SENT: EHLO ffmserver
DEBUG SMTP RCVD: 250-ffmserver.mailabc.local Hello [127.0.0.1]
250-AUTH GSSAPI NTLM LOGIN
250-AUTH=LOGIN
250-TURN
250-ATRN
250-SIZE 2097152
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250 OK
DEBUG SMTP Found extension "AUTH", arg "GSSAPI NTLM LOGIN"
DEBUG SMTP Found extension "AUTH=LOGIN", arg ""
DEBUG SMTP Found extension "TURN", arg ""
DEBUG SMTP Found extension "ATRN", arg ""
DEBUG SMTP Found extension "SIZE", arg "2097152"
DEBUG SMTP Found extension "ETRN", arg ""
DEBUG SMTP Found extension "PIPELINING", arg ""
DEBUG SMTP Found extension "DSN", arg ""
DEBUG SMTP Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP Found extension "8bitmime", arg ""
DEBUG SMTP Found extension "BINARYMIME", arg ""
DEBUG SMTP Found extension "CHUNKING", arg ""
DEBUG SMTP Found extension "VRFY", arg ""
DEBUG SMTP Found extension "OK", arg ""
DEBUG SMTP: use8bit false
DEBUG SMTP SENT: MAIL FROM:<[email protected]>
DEBUG SMTP RCVD: 250 2.1.0 [email protected] OK
DEBUG SMTP SENT: RCPT TO:<[email protected]>
DEBUG SMTP RCVD: 550 5.7.1 Unable to relay for [email protected]
Invalid Addresses
[email protected]
DEBUG SMTPTransport: Sending failed because of invalid destination addresses
DEBUG SMTP SENT: RSET
DEBUG SMTP RCVD: 250 2.0.0 Resetting
DEBUG SMTP SENT: QUIT
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 Unable to relay for
[email protected]
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at
de.mailabc.filework.beans.mail.MailSendingMsg.SendEmail(MailSendingMsg.java:115)
at
org.apache.jsp.jsp.dcs.lists.boxes.action.send.send_jsp._jspService(org.apache.jsp.jsp.dcs.lists.boxes.action.send.send_jsp:308)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 Unable to relay for
[email protected]
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:804)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:320)
at javax.mail.Transport.send0(Transport.java:164)
at javax.mail.Transport.send(Transport.java:81)
at
de.mailabc.filework.beans.mail.MailSendingMsg.SendEmail(MailSendingMsg.java:115)
at
org.apache.jsp.jsp.dcs.lists.boxes.action.send.send_jsp._jspService(org.apache.jsp.jsp.dcs.lists.boxes.action.send.send_jsp:308)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
###################### exception end ######################
any ideas
thanks a lot
faissalYou don't understand that message? It's specifically mentioned in the FAQ.
-
Cannot send mail from newsletter server and Server error: Unable to relay
We have newsletter server. Sometimes we sent mail by our exchange 2010 server. But recently we are unable to send mail to external mail server. we sent mail by newsletter server within a domain now. We need to solve. Pls. check below log file and provide
how to solve it.
Sender ID: [email protected]
our domain: www.silkways.net
LOG:
Status Msg : The email details entered successfully into the database.
Status Msg : The email details entered successfully into the database.
Access Level : 1
MAIL SENT TO : [email protected]
FAILED TO SEND MAIL TO : [email protected]
Error : SMTP Error: The following recipients failed: [email protected]<p>SMTP server error: 5.7.1 Unable to relay
</p>
FAILED TO SEND MAIL TO : [email protected]
Error : The following From address failed: [email protected]<p>SMTP server error: 5.5.2 Sender already specified
</p>
FAILED TO SEND MAIL TO : [email protected]
Error : SMTP Error: The following recipients failed: [email protected]<p>SMTP server error: 5.7.1 Unable to relay
</p>
FAILED TO SEND MAIL TO : [email protected]
Error : The following From address failed: [email protected]<p>SMTP server error: 5.5.2 Sender already specified
</p>
FAILED TO SEND MAIL TO : [email protected]
Error : The following From address failed: [email protected]<p>SMTP server error: 4.7.0 Too many errors on this connection, closing transmission channel
</p>
FAILED TO SEND MAIL TO : [email protected]
Error : SMTP Error: The following recipients failed: [email protected]<p>SMTP server error: 5.7.1 Unable to relay
</p>
FAILED TO SEND MAIL TO : [email protected]
Error : The following From address failed: [email protected]<p>SMTP server error: 5.5.2 Sender already specified
</p>Hi,
Since you are able to send emails to internal domain i assume the application server IP address already allowed into Receive Connector.
To relay application emails to external domain you should enable Externally Secured box in the Authentication Tab of the particular Receive Connector.
Kottees :My Blog Please mark it as an answer if it really helps you. -
Sendmailjpkg.sendmail - 550 5.7.1 Unable to relay
Hi to all,
Oracle 10g database.
We have an application that sends emails (only with one email address), with sendmailjpkg.sendmail,
We've recently installed an exchange 2010 server, and in doing so we've changed the relevant DNS/MX records to point the to new IP address. I changed the new SMTP address in database (in sendmail Java class – props.setProperty (“mail.host”,”NEW SMTP IP”), ...) and everything was ok when we sent email to local domain users, but when database sent to external email users we get this error:
javax.mail.SendFailedException: *550 5.7.1 Unable to relay*
I know what is the problem is, exchange required full authenication to send emails outside the domain with JavaMail, attempt at stopping spam…
But I do not know how to create authenticator class, how to put authentications in sendmail Java class or in my procedure where I use sendmailjpkg.sendmail, or anywhere else ?
Thanks!Isn't that a Java issue rather than a SQL or PL/SQL issue?
-
Hi!
I am with a problem during a sending e-mail for 3500
addressees.
In the way it process me of the one error and in log CF
Administrator shows the following error to it:
Invalid Addresses; nested exception is: class
javax.mail.SendFailedException: 550 5.7.1 Unable to relay for
What it could be?
Server Configuration:
Windows 2003 Standard with ColdFusion MX 7.02 (last update)
Best RegardsYou need to either authenticate your user or turn on relaying in your SMTP server. See the JavaMail tutorial for how to authenticate
-
There's a bug in either Microsoft Exchange or JavaMail API.
An exception is thrown when sending an email:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
class com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1141)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:536)
at javax.mail.Transport.send0(Transport.java:151)
at javax.mail.Transport.send(Transport.java:80)This exception is caused by, believe or not, because the same mail session has defined the "mail.imap.fetchsize" property in an earlier IMAP session.
I used this line to fetch a session and in the IMAP code I defined the fetchsize property to increase performance. An identical line was used in the SMTP code to fetch a session to send a mail. As it turns out, the SMTP communication is disrupted by the fetchsize property.
Session session = Session.getDefaultInstance(props, null);
My solution was to change the SMTP code the following:
Session session = Session.getInstance(properties);
Hope this helps someone, somewhere in the future...Well, I don't believe the fetchsize property is disrupting SMTP sending, but it is true that
everyone who calls Session.getDefaultInstance gets the same Session object, and the
properties for that Session are set by the first caller. The properties passed in by
subsequent callers are ignored.
The javadocs for the method try to explain this behavior, perhaps not well enough. -
Hi all
i try to send a message from an internal address to an external address and i get an error :
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for external@adress
I use the same code in many customers enviroment and i have no problem.
I try to set on java
settings.setProperty("mail.smtp.auth", true);
but doesn't work.
i read the faq and i find :
Q: When I try to send a message, why do I get javax.mail.SendFailedException: 550 Unable to relay for my-address?
A: This is not a JavaMail problem. This is an error reply from your SMTP mail server. It indicates that your mail server is not configured to allow you to send mail through it. Typically, mail servers for an organization will be configured to allow mail from within the organization to be sent to other addresses within the organization, or to addresses external to the organization. It will also typically allow mail coming from an address external to an organization to be sent to addresses within the orgnaization. What it will typically not allow is mail coming from an address external to the organization to be sent (relayed) to another address also external to the organization. The configuration of the mail server determines whether such relaying is allowed, and which addresses are considered internal vs. external. Often mail servers will require you to authenticate before they will relay messages. but i think is not my case,it say that the problem is from external to external, o r is possible that an internal address is set like external?
Are there other setting on server that can generate the exception?
In fact the mail server is not maintaned of my company so i have the password of the user from the customer, but i think that if is an invalid password i get another error right?
any idea?I get this error
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
at it.dpe.lib.mail.Mail.send(Mail.java:187)
at it.dpe.editoriale.gui.InvioMailForm.inviaMail(InvioMailForm.java:773)
at it.dpe.editoriale.gui.InvioMailForm.manageGenericMethod(InvioMailForm.java:263)
at it.dpe.lib.util.RunnableMethod.execCommands(RunnableMethod.java:83)
at it.dpe.lib.util.RunnableMethod.run(RunnableMethod.java:58)
at it.dpe.lib.gui.GenericForm$8.run(GenericForm.java:2532)
at it.dpe.lib.thread.DpeWait$4.call(DpeWait.java:222)
at it.dpe.lib.thread.DpeWait$4.call(DpeWait.java:219)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
i try to sent a message from internal address to an external.
If the message is sent from a mail client works.
Edited by: pedriky on Jul 13, 2010 11:56 PM -
550 5.7.1 Unable to relay for [probably bogus Email address]
Hello,
My Exchange Server has been reporting numerous instances of the following message (or very similar messages) most days for a couple of weeks or so now:
This is an SMTP protocol log for virtual server ID 1, connection #3. The client at "118.161.64.59" sent a "rcpt" command, and the SMTP server responded with "550 5.7.1 Unable to relay for [email protected] ". The
full command sent was "rcpt TO: <[email protected]>". This will probably cause the connection to fail. For more information, click http://www.microsoft.com/contentredirect .asp
The Email address is unknown, and probably bogus.
What really concerns me is that the messages from yesterday (Sunday!) contained a now defunct Email account from someone who used to work in our London head office, but left about a couple of years ago. To me, this implies that there has been unauthorised
access to the company IT infrastructure - possibly at both sites - and that someone is trying to get our Exchange Server to relay unsolicited / mailicious Emails. The above message suggests that the attempted relaying has not been successful to date, and I
can't find anything out of the ordinary in the SMTP queues or the Exchange logs - but the persistence does concern me.
So, am I reading this correctly? If so, what can I do about it? Or if not, what does it really mean?
Thankyou very much for your help.
Kind regards,
KeithIf your Exchange server is accessible from the Internet, as it would be to allow you to receive SMTP mail unless you have a relay server like an Exchange Edge server, then Spammers will attempt to use it to relay. Your server is correctly rejecting
that, so I don't see a problem. If you're worried about this, then you could contract with a third-party cloud-based message hygiene service like Exchange Online Protection, and the restrict the IP address that can talk to your Exchange server to those
of the hygiene service.
Ed Crowley MVP "There are seldom good technological solutions to behavioral problems." -
Smtp;550 5.7.1 Unable to relay #SMTP#
our dev wrote a script that'll send an email externally but it bounces with the following error:
smtp;550 5.7.1 Unable to relay> #SMTP#
Your message wasn't delivered due to a permission or security issue. It may have been rejected by a moderator, the address may only accept e-mail from certain senders, or another restriction may be preventing delivery.
It works fine if I want to send the email internally tho. The server is on the allowed list on the receive connector and anonymous users is checked in the permissions groups tab
using exchange 2010 SP3Hi Cinekc,
Besides SSorin's suggestion, I would like to clarify the following things:
1. Please use telnet to port 25 to test SMTP communication. Here is a thread for your reference.
Exchange server unable to send mail outside
http://social.technet.microsoft.com/Forums/exchange/en-US/ce90b2ea-d2d2-4f15-ab56-43da021c52c9/exchange-server-unable-to-send-mail-outside?forum=exchange2010
2. Please contact recipient side to verify if there is any limitation. What's more, I recommend you ask the recipient side add yourdomain.com into "The sender's domain is" exception of Anti-Spam transport rule and check the result.
Here is a thread for your reference.
Exchange 2013 reject message with unintelligible reason
http://social.technet.microsoft.com/Forums/exchange/en-US/e4c19d74-460e-46ff-81bb-e97dedfcec93/exchange-2013-reject-message-with-unintelligible-reason?forum=exchangesvradmin
Hope it helps.
If there are any problems, please feel free to let me know.
Best regards,
Amy
Amy Wang
TechNet Community Support -
#5.7.1 smtp;550 5.7.1 Unable to relay
Hi,
In my company we are facing lot of problems sending emails to some recipients when their email addresses are surrounded by single quotes, in Outlook. Ex.: '[email protected]'. If we remove the quotes the message relays with no problem. The question is why there
are some others domains that if we keep the single quotes the message is relayed. Is the problem in our side (my company) or the other side is rejecting the message in some way. What should I do in this case? I'll appreciate any help. We use Oulook 2007 and
Exchange Server 2003.
Here is the error:
Your message did not reach some or all of the intended recipients.
Subject: Here is the subject
Sent: 23-07-2014 08:52
The following recipient(s) cannot be reached:
[email protected] on 23-07-2014 08:52
You do not have permission to send to this recipient. For assistance, contact your system administrator.
<mail_server #5.7.1 smtp;550 5.7.1 Unable to relay for [email protected]>Hi,
Thank you sou much for your reply.
My question was. If I keep the single quotes for SOME EXTERNALS RECIPIENTS, I get the error message aboved.
If I remove the single quotes for THOSE EXTERNALS RECIPIENTS the messages can be relayed.
Best regards,
Edmilton Cruz.
Thursday, July 31, 2014 1:40 PM
Hi again,
Any answer to this issue???
Another thing that is happening is that when we send emails to some recipients and their email addresses are in upper case we receive a NDR #5.7.1 smtp;550 5.7.1 Unable to relay for ...
Best regards,
Edmilton Cruz. -
Error 550 5.7.1 unable to relay with SMTP PORT 25 Exchange 2013
Hi All,
I know this issue has been posted for a while, but still can't resolved issue. We've new Exchange 2013 SP1 (CU4) installation, everything is working properly, the OWA, Exchange Client Connection, SMTP/POP with SSL, except with SMTP Using Port 25 Non-Encrypted
Connection.
If I'm using the SMTP Port 25 without TICK "My Outgoing Server (SMTP) Requires authentication", I've got the error: "550 5.7.1 Unable to relay", but if I TICK the option above, my message will be deliver without any error, how do i get
rid this problem, I need to UN-TICK the option above for the time being, since we've hundreds email account, I want to avoid to educate and tell the user and even remote their PC, just to configure this issue, it will drive me crazy, we're going to use the
Exchange Client Connection in the future, If everything is smooth and ok.
I research this problem on the Internet and of course with TECHNET, but still can't, anyone can help me on this?
fyi, I tried so many things, delete the default the Default Front End Transport for Port 25, it also not fix my issue.
Thx
IrwanHi
You can paste the output of below result
Get-receiveconnector | fl name,bindings,PermissionGroups
I think your default receive connector should be missing out some permissions.
Also try to see if you get any message on protocol logs and paste them too
Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish
(MVP) -
Exchange Server 2013 - 550 5.7.1 Unable to Relay
Hi Guys,
I have recently setup Exchange 2013, I have been having an issue were the Emails that we are attempting to send are getting stuck in the 'Drafts' box. I decided to use Telnet to see if I could send emails that way but much to my disappoint I was unable to
send emails to external contacts using Telnet getting the following error '550 5.7.1 Unable to relay'.
For my external server lookup I have my internal DNS Server for the DNS and my internal DNS Servers forward DNS Requests to Google's Public DNS Servers (8.8.8.8 and 8.8.4.4). I have tried removing Google's DNS Settings and just using my internal servers
and using Google's DNS Server and not our internal DNS Settings.
Does anyone have any suggestion on what might be causing this issue. I have been working through the solution in other posts on other web sites but so fare not much luck.
Kind Regards
Thomas Park
Network Engineer
TPark IT TechnicianHi,
Please check whether the Windows services that Exchange requires on a server have started via Test-Servicehealth. Especially Exchange Transport service and Mailbox transport service.
Please add the IP address of our DNS server for testing.
Please also re-configure our Relay Connector, found a useful article for your reference:
How to Configure a Relay Connector in Exchange Server 2013
http://exchangeserverpro.com/exchange-2013-configure-smtp-relay-connector/
If still not working unfortunately, please trace these messages via Message Tracking to check whether there is any error. If has, please post the details for the further troubleshooting.
Disclaimer:
Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure
that you completely understand the risk before retrieving any suggestions from the above link.
Thanks
Mavis
Mavis Huang
TechNet Community Support -
Javax.mail.SendFailedException: 550 5.7.1 Unable to relay
Hi All,
I am getting the below Exception message when I am executing my JavaMail
program.
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]
Please can anyone help me out.
Regards,
Ravi.what's wrong to this source code, if try to send mail to local account actually it success, but if i try to send mail eg:[email protected](outside my network) i found error this error to. i had to try not use encode userID/password into base64, but the result doesn't change.
if anyone have solution for this problem, please contact me @ [email protected]
Regards,
agam
error returned by java:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
class javax.mail.SendFailedException: 550 Relaying is prohibited
void com.sun.mail.smtp.SMTPTransport.sendMessage(javax.mail.Message, javax.mail.Address[])
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
import com.sun.mail.smtp.SMTPTransport;
import com.agam198.util.*;
public class PCMMail{
String sMailServer = "";
String sUserID = "";
String sPassword = "";
int iPort = 25;
String sTo = "";
String sFrom = "";
String sCC = "";
Message msg = null;
SMTPTransport transport = null;
Transport trns = null;
public PCMMail(StringPool sPool){
this.sMailServer = sPool.getString("SMTPServer.SERVER");
this.sTo = sPool.getString("SMTPAlert.TO");
this.sFrom = sPool.getString("SMTPAlert.FROM");
this.sCC = sPool.getString("SMTPAlert.CC");
this.sUserID = sPool.getString("SMTPServer.LOGIN");
this.sPassword = sPool.getString("SMTPServer.PASSWORD");
this.iPort = Integer.parseInt(sPool.getString("SMTPServer.PORT"));
initConnection();
public void initConnection(){
try{
System.out.println("MailServer: "+sMailServer);
System.out.println("To: "+sTo);
System.out.println("From: "+sFrom);
System.out.println("CC: "+sCC);
Properties props = new Properties();
props.put("mail.smtp.host", "152.118.89.0");
Session session = Session.getDefaultInstance(props,null);
trns = session.getTransport("smtp");
if(trns == null){
System.out.println("trans is not null");
else
System.out.println("trans null");
trns.connect(sMailServer,Base64.base64Encode ( sUserID ),Base64.base64Encode ( sPassword ));
if(trns.isConnected()){
System.out.println("connected to SMTP SERVER");
else{
System.out.println("not connect");
InternetAddress address = new InternetAddress();
//create a message
msg = new MimeMessage(session);
catch(Exception e){
public void sendMessage(String message){
sendMessage(getFirstLine(message),message);
public void sendMessage(String subject,String message){
try{
//prepare message
msg.setFrom(new InternetAddress(sFrom));
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(sTo));
msg.setSubject(subject);
msg.setSentDate(new Date());
msg.setText(message);
trns.send(msg);
System.out.println("message sent");
catch(Exception e){
e.printStackTrace();
public String getFirstLine(String message){
BufferedReader buf = new BufferedReader(new StringReader(message));
try{
return buf.readLine();
catch(Exception e){
return " ";
public static void main(String[] args){
StringPool sp = new StringPool();
sp.set("SMTPServer.SERVER","152.118.89.0");
sp.set("SMTPServer.PORT","25");
sp.set("SMTPServer.LOGIN","kiara");
sp.set("SMTPServer.PASSWORD","kiara");
sp.set("SMTPAlert.TO","[email protected]");
sp.set("SMTPAlert.FROM","[email protected]");
sp.set("SMTPAlert.CC","");
PCMMail pcm = new PCMMail(sp);
pcm.sendMessage("subject","message body");
} -
Mailbox unavailable. The server response was: 5.7.1 Unable to relay
I have tried to send a mail from my ASP.Net web application, But I Receive
"Mailbox unavailable. The server response was: 5.7.1 Unable to relay"
error in my log file, I have made the following change in SMTP Virtual server in IIS 6 Manager in the server
1.Added 127.0.0.1 and IP of server in Smtp Virtual Server->Properties->Access tab->Relay
under only the list below
2.Checked anonymous access in Smtp Virtual Server->Properties->Access tab->authentication
3.Changed IP address to All unassigned and also to IP of server in General tab
But no luck till now. Looking forward for your valuable reply. Thanks in AdvanceHi,
For this issue, i think you should ask in:
http://forums.asp.net/default.aspx/7?General+ASP+NET
Regards.
Vivian Wang -
Server error: '550 5.7.1 Unable to relay' with authoritative domain
Hi,
When trying to send email to external clients from outlook with (POP accopunts)with authoritative domain email address. we are receiving "Server error: '550 5.7.1 Unable to relay"Where internal emails are going properly.It use to work early &
it stopped suddenly yesterday we did not made any changes in SMTP.
We are able to send & Receive emails with our own domain facing problem only with authoritative domain email address.
Regards,
Perumal PHi,
I recommend you refer to the following article to configure the outlook 2010/2013 using IMAP or POP3, and check the result:
Set Up Outlook 2010 for IMAP or POP Access to Your E-Mail Account
Hope this helps!
Thanks.
Niko Cheng
TechNet Community Support
Maybe you are looking for
-
I am updating a WinHelp project that was previously developed in X3 but which I am now trying to update and compile in RoboHelp 7 for Word. The TOC won't display (i.e., the TOC navigation panel at the left doesn't display) when the help is launched.
-
Java.rmi.RemoteException: Only Administrators
Hello all, I am running Solution Manager 4.0 as Central Systems Installation (ABAP + Java System) with Oracle 10.2 on Windows Server 2003 Standard Edition. I recently downloaded new support package stack 08 to SP16 and then tried to update using JSPM
-
Invoice no + posnr + accounting doc
Hi All, I have a invoice number and accounting document number . From which table I can get this connection along with the POSNR field. Means this accounting has been done for this material Item, I checked in BSIS,BSEG and BKPF tables . But could not
-
Strange pkg-get problem help!!
Hello all, I am trying to update my pkg-get catalog and I get the following error. Its a fresh install from a day ago. # /opt/csw/bin/pkg-get -U WARNING: gpg not found Getting catalog... --12:44:38-- http://www.ibiblio.org/pub/packages/solaris/csw/i3
-
How deploy javafx Applet in Tomcat
Hi all! Please help me. How i can deploy JavaFX Applet in Tomcat