Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

why does my mail-sending code throw this Exception?

BreadfanBreadfan Member Posts: 22
[b][red]This message was edited by Breadfan at 2005-3-9 4:49:12[/red][/b][hr]

javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: 550 Invalid recipient: mishoch@yahoo.com
org.apache.jsp.jsp.sendPass_jsp._jspService(sendPass_jsp.java:85)
--------------------------------------------------------------------------
code:

Properties props = System.getProperties();
props.put("mail.smtp.host", "localhost");
Session s = Session.getDefaultInstance(props, null);
MimeMessage message = new MimeMessage(s);
//tuk trqbva da se smeni sender-a:
message.setFrom(new InternetAddress(Strings.NOTIF_EMAIL));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(request.getParameter("email")));
message.setSubject("ChessOffice.net - псевдоним и парола/username and password");
rs.next()
message.setText(
"Здравейте, "+rs.getString("fname")+" "+rs.getString("lname")+",
Вашите псевдоним и парола "
+"в сайта Chessoffice.net са:
"
+"псевдоним: "+rs.getString("username")+"
"
+"парола: "+rs.getString("password")
);
Transport.send(message);
-------------------------------------------------------------
I'm using windows XP, my internet connection is firewalled and I've set an SMTP server to run on my PC's IP address (Internet connections/properties/advanced/settings something like that) what's wrong, mishoch@yahoo.com is my email ? Thanks.






Comments

  • treshrtreshr Member Posts: 326
    Can you show us the code from sendPass_jsp.java so we can see where the problem starts.

    Thanx.


    --=][tReShR][=--

Sign In or Register to comment.