Re: email sent from java app haults queues



dylan.roehrig@xxxxxxxxx wrote:

Looking at the exchange logs, the last thing that the exchange server
says is

2006-03-22 20:42:11 4.79.181.18 OutboundConnectionResponse SMTPSVC1
mailserver - 25 - - 354+go+ahead 0 0 12 0 437 SMTP - - - -

I don't do Exchange, so I don't know what all that means. It's not exactly
transparent in meaning is it? Is that the server accepting the message from the
client, or the server attempting to forward it on?

If it's the Exchange server forwarding the message, and the 437 is a reply code
from the external MTA then that indicates a transient error. A 4xx reply code
indicates that was the message was ok, but the receiving MTA was unable to
process the message at the current time - please call again later. Always
supposing that Microsoft obey the accepted protocols...


Does JavaMail put a <CRLF>.<CRLF> automatically at the end of the
message?

It does everything required to compose a correct message. If it didn't the
Exchange server should not have accepted it.

Here is a snippet of code I use to send new users a "welcome" message (which
automatically generates their mail account) when I register them:

Properties props = System.getProperties();

// Setup mail server
props.put("mail.smtp.host", ConfigurationData.getMailServer());

// Get session
Session session = Session.getDefaultInstance(props, null);

// Define message
MimeMessage message = new MimeMessage(session);

message.setFrom(new InternetAddress("xxx@yyy"));
message.addRecipient(Message.RecipientType.TO, new
InternetAddress(recipient));
message.setSubject("Welcome to the Space Plasma Physics mail system");
message.setText("This is a test message to ensure that email is working.");

// Send message
Transport.send(message);

As you can see, there's not a lot to it. There certainly is no need to terminate
the message with a <CR><LF>.<CR><LF>. That is part of the transmission protocol
and is handled by Transport.send() for SMTP.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@xxxxxxxxxxxx
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
.



Relevant Pages

  • Re: Will PAY and EXPERIENCED person to help set up Exchange on Windows 2003
    ... Accepting everything you said as valid; how is a person to learn (or, ... No doubt there are way too many poorly executed Exchange (and small/medium ... >> WILL PAY EXPERIENCED PERSON!! ... >> server so I can send out my newsletter on my self-hosted Windows Small ...
    (microsoft.public.exchange2000.setup.installation)
  • Re: Open Relay question
    ... If you are using Exchange 2000 then the SMTP session is accepted but fails ... employees) sent to your exchange server. ... > my mail server is accepting test 8 and rejecting it once accepted and the ...
    (microsoft.public.exchange2000.general)
  • RE: Null session and Exchange2K
    ... Actually, Q309622 refers to the Global catalog server, rather than the ... Exchange server. ... Subject: Null session and Exchange2K ...
    (Focus-Microsoft)
  • RE: Outlook 2003 pias with .Net
    ... You have probably Exchange 2003 server who stops the session after a certain ... > I am trying to populate an exchange public folder with contacts, ...
    (microsoft.public.office.developer.automation)
  • Re: Outlook Web access error HTTP/1.1 503 Service Unavailable
    ... and Exchange will redirect the session to the ... other server if the mailbox is there. ... URL will stay the same regardless of the mailbox server. ... MVP - Exchange ...
    (microsoft.public.exchange.clients)