Please Ayuda con Excepcion de JAVAMAIL

Alex
08 de Diciembre del 2004
Hola

Necesito ayuda con un servlet que envía un mail con javamail en un principio en un principio logre enviar unos mails pero después me empezó a lanzar el siguiente excepción:

550 , Sender must first check for new mail

El codigo de la aplicación es este:

// import the JavaMail packages
import javax.mail.*;
import javax.mail.internet.*;

// import the servlet packages
import javax.servlet.*;
import javax.servlet.http.*;

// import misc classes that we need
import java.util.*;
import java.io.*;

public class sendmail extends HttpServlet {
String smtpServer;

public void init(ServletConfig config) throws ServletException
{
super.init(config);
smtpServer=Mi servidor SMTP;
}

public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
// get the message parameters from the HTML page
String from = req.getParameter("from");
String to = req.getParameter("to");
String subject = req.getParameter("subject");
String text = req.getParameter("body");

PrintWriter out = res.getWriter();
res.setContentType("text/html");

try {
// set the SMTP host property value
Properties properties = System.getProperties();
properties.put("mail.smtp.host", smtpServer);

// create a JavaMail session
Session session = Session.getInstance(properties, null);

// create a new MIME message
MimeMessage message = new MimeMessage(session);

// set the from address
Address fromAddress = new InternetAddress(from);
message.setFrom(fromAddress);

// set the to address
if (to != null) {
Address[] toAddress = InternetAddress.parse(to);
message.setRecipients(Message.RecipientType.TO, toAddress);
}
else
throw new MessagingException("No "To" address specified");

// set the subject
message.setSubject(subject);

// set the message body
message.setText(text);

// send the message
Transport.send(message);

out.println("Message sent successfully.");
}
catch (AddressException e) {
out.println("Invalid e-mail address.<br>" + e.getMessage());
}
catch (SendFailedException e) {
out.println("Send failed.<br>" + e.getMessage());
}
catch (MessagingException e) {
out.println("Unexpected error.<br>" + e.getMessage());
}
}
}

Agradeceria cualquier ayuda, Gracias.