Re: JAVAMAIL SMTP error 421

From: Matthew (mpetre_at_excite.com)
Date: 07/31/04


Date: 30 Jul 2004 17:51:46 -0700

java is a pain
depiessj@misys.com (Blacksheep) wrote in message news:<ead94383.0407090031.6621ed0f@posting.google.com>...
> Hi all,
>
>
> I've been looking at this problem for a while, browsing all possible
> resources for a possible explanation but no way.
> My problem is the following :
>
> I've got a JAVA application listening to messages falling on a
> MQSeries queue. The message falling on the queue contains all required
> information to compose a mail intended for some recipients. The
> application is connected to a mail server and is supposed to send the
> mail.
> In our development environment everything is fine and works properly.
> We are using Exchange server. I made several tests with some 3000
> messages falling on the queue and we got 3000 mails in our mail boxes.
> The program has been installed at a client site and there we run into
> trouble.
> After the fifth message has been sent, the program ends with an
> exception. It looks like the SMTP server had closed the connection
> with no apparent reason.
>
> The log looks like this :
>
> Wed Jun 23 14:59:49 CEST 2004 - spy3 - 5 tasks done.
> Wed Jun 23 14:59:50 CEST 2004 - alerter - MailError - Mail server
> error in execu
> ting a process.
> Error when sending a mail through Java Mail API.Can't send command to
> SMTP host;
> nested exception is:
> java.net.SocketException: Software caused connection abort:
> socket write error
> null
> com.misys.alerter.Spy$MailError: Error when sending a mail through
> Java Mail API
> .Can't send command to SMTP host;
> nested exception is:
> java.net.SocketException: Software caused connection abort:
> socket write
> error
> at com.misys.alerter.SpyMasterQ.doAction(SpyMasterQ.java:497)
> at com.misys.alerter.Spy.run(Spy.java:112)
>
> The line 497 is : try {mailer.sendMail(tmptitle, tmpbody,
> recipientTo,recipientDummy, recipientDummy);
>
> The class mailer fills in a mimeMessage and calls
>
> transport.sendMessage(message, message.getAllRecipients() ) ;
>
> which is where I loose control.
>
>
> The connection to the mail server is made through this method :
>
> public boolean connectSrv( String host, String user, String password)
> throws NoSuchProviderException, MessagingException {
>
> Properties props = new Properties();
> props.put("mail.smtp.connectiontimeout", "0" );
> props.put("mail.smtp.timeout", "0" );
> props.put("mail.debug", "true");
> session = Session.getDefaultInstance(props, null);
> transport = session.getTransport("smtp");
> transport.connect(host, user, password);
> /* store date time when connection occurs */
> dtconnected = new GregorianCalendar();
>
> return transport.isConnected();
> }
>
>
> I added the debug property to get more information. It shows an SMTP
> error 421.
>
> Here are some bits of output :
>
> DEBUG SMTP SENT: NOOP
> DEBUG SMTP RCVD: 250 2.0.0 OK
>
> DEBUG SMTP SENT: NOOP
> DEBUG SMTP RCVD: 250 2.0.0 OK
>
> DEBUG SMTP SENT: NOOP
> DEBUG SMTP RCVD: 421 Too many errors on this connection---closing
>
> DEBUG SMTP SENT: NOOP
>
>
> I have the feeling that something goes wrong on the server side but
> have no idea what.
> Has any of you already experienced such problem ?
>
> Thanks for your time reading this. Any help or suggestion will be
> highly appreciated.
>
> JC



Relevant Pages

  • JAVAMAIL SMTP error 421
    ... We are using Exchange server. ... The connection to the mail server is made through this method: ... DEBUG SMTP SENT: NOOP ...
    (comp.lang.java.programmer)
  • Re: AJAX devtool using Cobol
    ... managed by a Java Applet. ... Server Affinity is completely under ... just enter an asterix "*" for the Queue Name and then click ... Applet Java code is application-neutral and completely reusable. ...
    (comp.lang.cobol)
  • Re: JVM/Java memory footprint
    ... I found that if I use Java for developing the CLI ... application I will be exhausting the memory of our Application Server ... to make the JVM shareable. ... multiple client processes? ...
    (comp.lang.java.programmer)
  • Java Network Programming FAQ
    ... Java Network Programming FAQ. ... How can I find out who is accessing my server? ... What are socket options, and why should I use them? ... How does servlet performance compare to applets? ...
    (comp.lang.java.programmer)
  • Java Network Programming FAQ
    ... Java Network Programming FAQ. ... How can I find out who is accessing my server? ... What are socket options, and why should I use them? ... How does servlet performance compare to applets? ...
    (comp.lang.java.programmer)