users@javamail.java.net

Strange behaviour of javaMail in Windows XP and Norton Antivirus

From: Artur Silveira da Cunha <artur.silveira.da.cunha_at_gmail.com>
Date: Wed, 03 Nov 2010 02:00:27 +0100

Hi,

I'm working in project where in some cases I have to send some tenths or
hundreds emails that can have mono or multipart content.

To avoid to saturate the email servers with simultaneous connections , I
begin to use your FAQ purposed solution where messages are sent within
an unique Transport connection, in place of the static sendMessage where
we got one Transport connection for each sent email.

The problem it is that I have two behaviors depending the activation or
disabling of my "2010 Norton Internet Security" installed in my client
Windows XP.

If the "2010 Norton Internet Security" is disabled, I could verify with
WireShark and spying the message flow between my Window XP and the smtp
server that the entire contents of each email message are sent before
that the execution program passes to the following email. For some
lengthen email of more 10MB the execution stay synchronously inside
t.sendMessage(...) for more 2~3 minutes.

But when I activate the "2010 Norton Internet Security" the behaviour
changes, where with the same lengthen or small emails, the
t.sendMessage() is no more synchronous and it returns in a fast way. My
test flow of about 30 messages is very fast executed. During this loop,
the Wireshark spy show that only the email headers for 30 emails are
sent to the smtp server. It is only when I "close" the transport
connection that all the "30 body email contents" are flushed from the XP
to the smtp server. I could check later in my receiver thunderbird that
I could found all emails.

Have you been informed about this behaviour?. For me it is a big problem
because I want to avoid simultaneous connections from my XP and the smtp
server. Is there a way inside the javamail code to get a real
synchronous sendMessage, without interference from an external product
like the Norton product or another antivirus/Internet protection
package. Later this will be part of a package, where customers will use
it and I would like to avoid some huge support problems.

If do you want more informations, I can create a test program and
produce capture file showing the results.

Regards

Artur Silveira da Cunha