Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: JavaMail bug? Date: Mon, 1 Aug 2011 21:49:34 +0000 (UTC) Organization: UK Free Software Network Lines: 28 Message-ID: References: <995djcFq0nU1@mid.individual.net> <99njvpFv11U1@mid.individual.net> NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1312235374 29391 84.45.235.129 (1 Aug 2011 21:49:34 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Mon, 1 Aug 2011 21:49:34 +0000 (UTC) User-Agent: Pan/0.133 (House of Butterflies) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6716 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. So, where does THAT leave us? 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. 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? Do please post a response, but be aware that I'm unlikely to read it until next week. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |