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");
}

Similar Messages

  • Invalid Addresses; nested exception is: class javax.mail.SendFailedException: 550 5.7.1 Unable to relay for

    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 Regards

    You need to either authenticate your user or turn on relaying in your SMTP server. See the JavaMail tutorial for how to authenticate

  • Javax.mail.SendFailedException: 550 5.7.1

    While trying to insert technician details into the DB, I get the following error. In the details I am entering an email id to which an email should be sent describing the details. The error is below :
    Error:  Error while Inserting Technician Details.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]
    Could anyone please suggest a solution ?.
    Your answers would be rewarded!!
    Thanks,
    Padmarajan

    Hi Padmarajan,
    Can you try this first from your Portal server ...
    telnet smtpserverip 25
    if you can connect then try sending a dummy mail to the same id as mentioned below.
    This will help to verify if the problem exists at Portal level or SMTP server
    regards,
    piyush
    ps: please mark all useful answers.
    regards,
    piyush

  • Javax.mail.SendFailedException: 550 5.7.1 ... Relaying denie

    My machine is on the DNS and does not require authentication to send e-mail. It also can send and recieve e-mail from the outside world with no problems; however this is the error I see in the logs:
    2003-12-11 10:03:49,151 INFO org.dspace.app.webui.servlet.RegisterServlet @ anonymous:session_id=8E5A9C16A74EAA9F334FF566CB6714BF:error_emai$
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    javax.mail.SendFailedException: 550 5.7.1 <[email protected]>... Relaying denied
    at javax.mail.Transport.send0(Transport.java:219)
    at javax.mail.Transport.send(Transport.java:81)
    at org.dspace.core.Email.send(Email.java:259)
    at org.dspace.eperson.AccountManager.sendEmail(AccountManager.java:291)
    at org.dspace.eperson.AccountManager.sendInfo(AccountManager.java:251)
    at org.dspace.eperson.AccountManager.sendRegistrationInfo(AccountManager.java:96)
    at org.dspace.app.webui.servlet.RegisterServlet.processEnterEmail(RegisterServlet.java:272)
    at org.dspace.app.webui.servlet.RegisterServlet.doDSPost(RegisterServlet.java:206)
    at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:153)
    at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:110)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
    Can someone tell me what I am doing wrong here?
    Thanks.

    The important line in the stack trace is
    javax.mail.SendFailedException: 550 5.7.1 <[email protected]>... Relaying denied
    The 550 error is being returned by the SMTP server to the your client as per the RFC.. It tells us that the client has built a message and has pushed it to the server. The server is looking at the message and finds something it doesn't like. It then returns the 500 series error to the client.
    The relative locations of the server and client may be an issue since you can configure your server to treat clients run locally different, usually you have the localhost unrestricted and put the filters on for everyone else (there are some admins that lock down local clients on the theory that no one should be running a client on the server so if someone tries they must have hacked the box).
    If you try running a different client on the machine with the identical settings for all the header fields you will still get the 550 error. At this point I would have a talk with the admin and ask what the rules for the server are.

  • Error: javax.mail.SendFailedException

    Hi all,
    I have a requirement to send a mail on click of a button. I have written a simple java code using java mail API. But while running the application i am getting
    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]
    If i run the java code as a standalone java application everything is fine. Only in webdynpro application i am getting the above mentioned error.
    My question is do we have to configure any settings in the WAS. If so, can somebody give me a detailed answer how to do the configuration.
    Thanks and Regards,
    Rathna

    I stopped the Antivirus service and checked the application but it doesn't help.
    Here is the code. But the code is working fine.
    // Get system properties
    Properties props = new Properties();
    // Setup mail server
    props.put("mail.pop3.host","myserver");
    props.put("mail.pop3.auth","true");
    Authentication auth = new Authentication("[email protected]","abcd");
                   Session session = Session.getInstance(props,auth);
                   Store store = session.getStore("pop3");
                   store.connect("myserver","[email protected]","abcd");
                   System.out.println("Connected");
                   MimeMessage message =  new MimeMessage(session);
                   message.setFrom(new InternetAddress("[email protected]"));
                   message.addRecipient(javax.mail.Message.RecipientType.TO, new InternetAddress("[email protected]"));
                   message.setSubject("Hello JavaMail Attachment");
                   // create the message part
                   MimeBodyPart messageBodyPart =  new MimeBodyPart();
                   //fill message
                   messageBodyPart.setText("Hi");
                   Multipart multipart = new MimeMultipart();
                   multipart.addBodyPart(messageBodyPart);
                   // Part two is attachment
                   messageBodyPart = new MimeBodyPart();
                   String fileAttachment="D:\Message.txt";
                   DataSource source =  new FileDataSource(fileAttachment);
                   messageBodyPart.setDataHandler(new DataHandler(source));
                   messageBodyPart.setFileName(fileAttachment);
                   multipart.addBodyPart(messageBodyPart);
                   // Put parts in message
                   message.setContent(multipart);
                                  // Send the message
                   javax.mail.Transport.send(message);
                   System.out.println("Mail sent successfully");
                   store.close();

  • 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?

  • Please help! javax.mail.SendFailedException is killing me

    im trying to send myself an email through javax.mail and this is the error i get: it is thrown from Transport.send(msg);i dont have access to its source so i cannot trace through it... can anyone please tell me what might cause this error?
    javax.mail.SendFailedException: 550 <[email protected]>: Recipient address rejected: Relay access denied

    Hi,
    I'm trying to send mail thro a servlet.
    When I use host as 'mail.vsnl.com'
    It gives the following exeception
    Relay access denied
    can U help me!
    thanks in adv.
    Isaaac

  • Class javax.mail.SendFailedException

    Hi,
    Let me know regarding java mail. I am facing the error as follows,
    ===============Exception=====================
    javax.servlet.ServletException: Sending failed;
    nested exception is:
         class javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
         class javax.mail.SendFailedException: 550 not local host gmail.com, not a gateway
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.sendmail3_jsp._jspService(sendmail3_jsp.java:75)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    ================sourcecode============================
    <%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*" %>
    <%
    Properties props = new Properties();
    props.put("mail.smtp.host", "66.34.40.98");
    Session s = Session.getInstance(props,null);
    MimeMessage message = new MimeMessage(s);
    InternetAddress from = new InternetAddress("[email protected]");
    message.setFrom(from);
    InternetAddress to = new InternetAddress("[email protected]");
    message.addRecipient(Message.RecipientType.TO, to);
    message.setSubject("Test from JavaMail.");
    message.setText("Hello from JavaMail!");
    Transport.send(message);
    %>
    <html>
    <p align="center">A Message has been sent.<br>Check your inbox.</p>
    <p align="center">Click here to send another!</p>
    </html>

    Is there any rule defined on the mailserver that BPEL is accessing via SMTP? Is it directly checking the address for validation or something?
    Can you do a SMTP transaction on the BPEL server for this mail account only?
    1) Create a notification process that sends a mail only for this user.
    2) open a telnet session from the BPEL server commandline to do a SMTP conference.
    http://nl.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

  • Javax.mail.SendFailedException: Recipient unknown

    Hi,
    I know similar topics have been posted before but even after going through them all I have still not found a solution.
    I am trying to send alert emails through my JavaMail application and get the Exception below. I am able to send emails to internal address', but not external address' such as my hotmail account. I have even asked the Administrator to put my IP address in the list of allowed IP's. Does anyone have any ideas? If anyone would like to take a look at the source code i have pasted it underneath the stacktrace.
    Thanks in advance.
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    javax.mail.SendFailedException: 550 <[email protected]>, Recipient unknown
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    javax.mail.SendFailedException: 550 <[email protected]>, Recipient unknown
    at javax.mail.Transport.send0(Transport.java:218)
    at javax.mail.Transport.send(Transport.java:80)
    at Test1.main(Test1.java:28)
    SOURCE:
    import javax.mail.internet.*;
    import javax.activation.*;
    final public class Test1 {
    private static Session session;
    public static void main(String[] args)
         try
              Properties props = new Properties();
              props.put ("mail.smtp.host", "207.132.45.5");
              props.put ("mail.smtp.port", "25");
              session = Session.getInstance(props, null);
              MimeMessage message = new MimeMessage(session);
              message.setFrom (new InternetAddress ("[email protected]"));
              message.setRecipient (Message.RecipientType.TO, new InternetAddress ("[email protected]"));
              message.setSubject ("test message");
              Multipart multipart = new MimeMultipart();
              BodyPart messageBodyPart = new MimeBodyPart();
              multipart.addBodyPart (messageBodyPart);
              messageBodyPart.setText ("message body");
              message.setContent (multipart);
              javax.mail.Transport.send (message);
         } catch (Exception e) {
              System.out.println (e.toString());
              e.printStackTrace();

    Personal, I am sending a class example that uses authentication in the email sending:
    * Class JAVA
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import java.lang.*;
    import java.lang.Exception;
    public class email
    public void sendSimpleMail (String mailServer, String subject,String to,String from, String mensagem)
    throws AddressException , MessagingException
    Properties mailProps = System.getProperties();
    mailProps.put("mail.smtp.host", mailServer);
    mailProps.put("port","25");
    mailProps.put("mail.smtp.auth", "true");
    Session mailSession = Session.getDefaultInstance(mailProps, new MyPasswordAuthenticator("username", "password"));
    InternetAddress destinatario = new InternetAddress (to);
    InternetAddress remetente = new InternetAddress (from);
    Message message = new MimeMessage (mailSession);
    message.setFrom(remetente);
    message.setRecipient( Message.RecipientType.TO, destinatario );
    message.setSubject (subject);
    message.setContent (mensagem.toString(), "text/plain");
    try
    Transport transport = mailSession.getTransport("smtp");
    transport.connect(mailServer," ", " ");
    transport.send(message);
    catch (javax.mail.SendFailedException sfe)
    System.out.println("FALHA: " + sfe);
    catch (MessagingException e)
    System.out.println("erro: " + e);
    /** This is the authenticator for SMTP session */
    public static class MyPasswordAuthenticator extends Authenticator
    private String username = null;
    private String password = null;
    public MyPasswordAuthenticator(String username, String password)
    super();
    this.username = username;
    this.password = password;
    public PasswordAuthentication getPasswordAuthentication()
    return new PasswordAuthentication(username, password);
    * File JSP
    <html>
    <body>
    <%@ page import="email, javax.mail.*, javax.mail.internet.*, java.util.*" %>
    <jsp:useBean id="email" scope="session" class="email"/>
    <%
    try
    String mailServer = "myServer";
    String assunto = request.getParameter("assunto");
    String para = request.getParameter("para");
    String de = request.getParameter("de");
    String mensagem =request.getParameter("mensagem");
    email.sendSimpleMail(mailServer, assunto, para, de, mensagem);
    %>
    <p>Email enviado com Sucesso !!!</p>
    <%
    catch (AddressException e)
    %> <p>Endereco de Email invalido</p><%
    catch (MessagingException e)
    %> <p>Impossivel enviar o email.</p><%
    %>
    </body>
    </html>

  • Javax.mail.SendFailedException: Invalid Addresses

    Hi all,
    I write a web application with a module can send mail to specific mail address using JAVAMAIL . I test my SendMail.java  which has sendEmail() function with command line ../java SendMail and it run OK. But when I call sendEmail() from my web page it throw out ERROR: javax.mail.SendFailedException: Invalid Addresses.
    I don't know why? Do you have any idea about it ?
    Thanks!

    Hi all,
    This is more Error information:
    javax.mail.SendFailedException: Invalid Addresses;
      nested exception is:
        com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay
        at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1294)
        at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:635)
        at view.MailImplement.sendEmail(MailImplement.java:152)
        at view.MailImplement.main(MailImplement.java:40)
    Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay
    Thanks a lot!

  • Inquiry on javax.mail.SendFailedException: Invalid Addresses error

    Hi,
    Anyone does have any idea why the following is being encountered during the email authentication process? We are using PeopleSoft application and we have notification functionality which will send a notification email to the users but email not being sent due to an invalid email address but actually the email is active and valid. Below are the logs from SMTP
    Log Start:
    DEBUG SMTP: Sending failed because of invalid destination addresses
    Wed Jul 31 09:38:14 GMT+08:00 2013 RSET
    Wed Jul 31 09:38:14 GMT+08:00 2013 250 2.0.0 Resetting
    Wed Jul 31 09:38:20 GMT+08:00 2013 javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    class com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 User unknown
    Wed Jul 31 09:38:20 GMT+08:00 2013 at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1141)
    Wed Jul 31 09:38:20 GMT+08:00 2013 at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:536)
    Wed Jul 31 09:38:20 GMT+08:00 2013 at com.peoplesoft.pt.mcf.mail.MCFOutboundEmail.send(MCFOutboundEmail.java:686)
    Wed Jul 31 09:38:20 GMT+08:00 2013 at com.peoplesoft.pt.mcf.mail.MCFOutboundEmail.send(MCFOutboundEmail.java:854)
    Log End:
    Kindly let us know your thoughts on this.
    Thanks.

    This isn't an authentication problem.  You're sending to an address that your server doesn't know about, so it's rejecting your message.  The error from the server is:
    550 5.1.1 User unknown

  • Javax.mail.SendFailedException

    HI all,
    I have an application which reads .csv file, picks up email ids and sends e-mail to mentioned 'to' address.
    There are 199 diffreent email ids. I could send upto 90 emails.
    But, after that, i got following error !
    error message:
    javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: mail.**********.com, port: 25
    I don't know the reason for it. Can any one please guide me in this regard?
    Thanks in advance !
    Regards
    Ashvini

    Try to give all the address in TO field with comma seperation and check it out.
    Regards
    Balu

  • [help] javax.mail.SendFailedException

    What it means?
    javax.mail.SendFailedException: Invalid Addresses; nested exception is: class com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
    I use javax.mail API to send email from java servlet using a .info smtp server.
    It is the domain .info that create this error?
    Can i resolve?
    I tryed with a .it smtp server but it doesn't change...only with the server smtp of my ISP the mail was send correctly!
    Sorry for my english...Help Me!

    The SMTP server you use does not allow relaying mesages from/to the specified domain. Example: you cannot use yahoo's SMTP server to relay an email to [email protected] Change your rcpthosts on the SMTP server.

  • 550 5.7.1 Unable to relay for ... (not a question, just a FAQ item)

    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.

  • Server Response: 550 5.7.1 Unable to relay

    SBS 2011 I have exchange 2010,
    Internally Outlook send/ Receive working fine-- Local Ip address.
    Owa Send/Receive working fine.
    But remote user can receive the Emails, But cant send the emails.
    Subject 'tes'
    Server Error: 550
    Server Response: 550 5.7.1 Unable to relay
    Server: 'xxx.xxx.xxx.xxx'---- Public IP address
    Windows Live Mail Error ID: 0x800CCC79
    Protocol: SMTP
    Port: 25
    Secure(SSL): Yes
    How to fix this issue ?

    Hi,
    Did you create a relay connector to allow to relay in Exchange? About how to create a relay connector, you can refer to the following article.
    How to Configure a Relay Connector for Exchange Server 2010
    http://exchangeserverpro.com/how-to-configure-a-relay-connector-for-exchange-server-2010/
    Note: 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.
    To allow a device to use Exchange to relay a message to an outside recipient, you also need the ms-Exch-SMTP-Accept-Any-Recipient attribute.
    Get-ReceiveConnector -Identity relayconnector | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Recipient"
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

Maybe you are looking for

  • My safari won't work

    I opened my computer yesterday and i could not open Safari, i also had internet explorer.. but it was no where to be found. A friend told me that although there are few viruses for mac's there still are some. he said that he had one once and it did a

  • IPod touch dead after Unknown error 1602 during upgrade to OS 4.02

    Attempted an upgrade to IPod touch OS 4.02 last night. This morning it showed Unknown error 1602. It won't power on. I plug it into either this computer or another (both with latest ITunes) and Windows "One of the USB devices has Malfunctioned, and W

  • MIRO Error-Can not post to mat.account & using overhead cost centre &.

    Dear Colleagues, On MIRO,users have come across this error where they can not post to a particular G/L account using 2 different cost centres(219 & 220). We have some validations on OB28 but although one particular step menitons this message as I sta

  • Backup jobs and password changing problem

    Hi I have created few rman job in my db (11.2) to backup database. I my company i have to change all system passwords (os - oracle, system, syman, etc...) every 90 days. When i changing password for user who created backup jobs, this jobs stop workin

  • Best Camcorder for the Mac

    I just want to know what everyone's opinions are on the best Camcorders that are out there for the Mac. Here are some of the attributes that I would rank from most important to the least. - Compatibility with OSX - Most Bang for your Buck (image qual