Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Newsgroups: comp.lang.java.programmer From: Andreas Leitgeb Subject: Re: JavaMail bug? References: <995djcFq0nU1@mid.individual.net> Reply-To: avl@logic.at User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: Date: 01 Aug 2011 12:54:18 GMT Lines: 16 NNTP-Posting-Host: gamma.logic.tuwien.ac.at X-Trace: 1312203258 tunews.univie.ac.at 71616 128.130.175.3 X-Complaints-To: abuse@tuwien.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6713 Martin Gregorie wrote: > The 'gotcha' turned out to be my omission to set the 'mail.smtp.host' > property. I didn't do that because the connect() documentation says that > it overrides the default host. This turns out to be incorrect: the MTA > host named in connect() appears in all the debugging and is used by the > getURL method, *but* the hostname supplied in the 'mail.smtp.host' > property is what defines the MTA that is actually used. If the property > is omitted the MTA host name defaults to localhost. Fwiw: I recently saw this kind of behaviour on Oracle on a Solaris host: Some mailhost is configured for "smtp_out_server", which is supposed to be used for utl_mail (pl/sql), but is also used for utl_smtp (ignoring the hostname passed to utl_smtp.Open_Connection(...).) I haven't used JavaMail myself, so can't say much about that.