Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

email sendind failed (SendFailedException: 550 5.7.1 Unable to relay )

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Execptions help to resove)
Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for
my codes
package fraternity.Mails;

import java.util.*;
import javax.activation.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.naming.*;
public class Mails

public String msgsend()

InitialContext ic = new InitialContext();
Session session = (Session) ic.lookup("MyMail1");
Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
props.put("", "localhost");
Session session2 = session.getInstance(props);
Message msg = new MimeMessage(session2);
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(""));
msg.setSentDate(new Date());
MimeBodyPart mbp = new MimeBodyPart();
mbp.setText("Testing Java Mail");
Multipart mp = new MimeMultipart();

catch(Exception es)
return es.getMessage();
return " No error"+"message successfully send..!";
sivasm,(gobi arts)
Posts: 22649
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"siva sm",

Please read your private messages regarding an important announcement.

Thank you,

This looks like a job for .... legal tender! It says so right in this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic