Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #6750

Re: JavaMail bug?

From Nigel Wade <nmw-news@ion.le.ac.uk>
Newsgroups comp.lang.java.programmer
Subject Re: JavaMail bug?
Date 2011-08-02 16:34 +0100
Message-ID <99qjntFk6uU1@mid.individual.net> (permalink)
References (2 earlier) <j0khlj$8bg$3@localhost.localdomain> <j0kilj$8bg$4@localhost.localdomain> <j0v8t7$os9$1@localhost.localdomain> <99njvpFv11U1@mid.individual.net> <j1771e$smf$1@localhost.localdomain>

Show all headers | View raw


On 01/08/11 22:49, Martin Gregorie wrote:
> On Mon, 01 Aug 2011 13:20:09 +0100, Nigel Wade wrote:
>
>> What does my code do if you run it exactly as is? Does it attempt to
>> connect to yahoo.com or our mail server (you won't actually be able to
>> connect, it's blocked on port 25)?
>>
> It fails connecting to your server.

Yes, well, that's what I said would happen.

>
> So, where does THAT leave us?

With the fact that it /attempted/ to connect to our mail server - not 
localhost, and not yahoo.com.

> The only difference is that you call
> getDefaultInstance(props) while I call getInstance(props) and, according
> to the documentation, these should do exactly the same the first time
> they're called.

I see the same behaviour with either getDefaultInstance() or 
getInstance() - it connects to our mail server.

>
> BTW, I added the single property setting line to my application code so
> that it uses the same hostname for 'mail.smtp.host' as connect(host,
> user, passwd) does. That code now connects directly to the expected
> server.
>
> What does my SSCE do in your environment?

I get:

javax.mail.MessagingException: Unknown SMTP host: zoogz.gregorie.org;
   nested exception is:
         java.net.UnknownHostException: zoogz.gregorie.org

I presume your DNS does not propagate upward from your zone. But it /is/ 
attempting to resolve that hostname via our DNS servers. It's not using 
localhost.


-- 
Nigel Wade

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-23 20:32 +0000
  Re: JavaMail bug? Knute Johnson <september@knutejohnson.com> - 2011-07-23 20:54 -0700
    Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-24 09:50 +0000
      Re: JavaMail bug? Knute Johnson <september@knutejohnson.com> - 2011-07-24 09:27 -0700
        Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-25 19:36 +0000
          Re: JavaMail bug? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2011-07-25 23:00 -0700
            Re: JavaMail bug? Steve Sobol <sjsobol@JustThe.net> - 2011-07-25 23:18 -0700
              Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-26 17:49 +0000
            Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-26 17:42 +0000
  Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-07-25 15:40 +0100
    Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-25 19:54 +0000
      Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-25 20:11 +0000
        Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-29 21:32 +0000
          Re: JavaMail bug? Knute Johnson <september@knutejohnson.com> - 2011-07-29 16:26 -0700
          Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-01 13:20 +0100
            Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-01 21:49 +0000
              Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-02 16:34 +0100
                Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-02 20:01 +0000
                Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-03 09:27 +0100
                Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-08 22:50 +0000
                Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-09 13:31 +0100
                Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-09 22:47 +0000
                Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-10 09:34 +0100
                Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-10 19:37 +0000
                Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-03 09:38 +0100
                Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-16 21:06 +0000
                Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-17 10:29 +0100
                Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-17 19:54 +0000
                Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-18 09:34 +0100
                Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-18 19:50 +0000
          Re: JavaMail bug? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-01 12:54 +0000

csiph-web