Javax.mail Error : SendFailedException: 554
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Irfan_Mohiuddin
Posted On:   Tuesday, March 27, 2001 08:40 AM

I am new to java mail. I am getting an error.What could be the possible reasons for this error and what would be the possible solution.Thanks in advance. Error and code are given below: ERROR: "javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: 554 : Recipient address rejected: Relay access denied" JSP CODE : <%@ pageimport=" javax.mail.*, javax.mail.internet.*, javax.activation.*,java.util.*" %> <% try{ Properties props = new Properties(); Sessio   More>>

I am new to java mail. I am getting an error.What could be the possible reasons for this error and what would be the possible solution.Thanks in advance. Error and code are given below:


ERROR:


"javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: 554 : Recipient address rejected: Relay access denied"


JSP CODE :


<%@ pageimport=" javax.mail.*, javax.mail.internet.*, javax.activation.*,java.util.*"
%>








<%


try{


Properties props = new Properties();
Session sendMailSession;
Store store;
Transport transport;


sendMailSession = Session.getInstance(props, null);


props.put("mail.smtp.host", "XX.X.X.X");


Message newMessage = new MimeMessage(sendMailSession);


newMessage.setFrom(new InternetAddress(request.getParameter("from")));


newMessage.setRecipient(Message.RecipientType.TO, new InternetAddress(request.getParameter("to")));


newMessage.setSubject(request.getParameter("subject"));


newMessage.setSentDate(new Date());
newMessage.setText(request.getParameter("text"));


transport = sendMailSession.getTransport("smtp");
transport.send(newMessage);
%>


Your mail has been sent.



<%
}
catch(MessagingException m)
{
out.println(m.toString());
}
%>


   <<Less

Re: Javax.mail Error : SendFailedException: 554

Posted By:   nitz_nitz  
Posted On:   Thursday, June 7, 2001 12:48 AM

I am facing the same problem as above
If anyone finds a soln forward it to me..
As far as my knowledge goes the problem lies with the server as sometime it sends the mail and sometimes t doesnt.
About | Sitemap | Contact