Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #6712
| From | Nigel Wade <nmw-news@ion.le.ac.uk> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: JavaMail bug? |
| Date | 2011-08-01 13:20 +0100 |
| Message-ID | <99njvpFv11U1@mid.individual.net> (permalink) |
| References | <j0fb5e$sat$1@localhost.localdomain> <995djcFq0nU1@mid.individual.net> <j0khlj$8bg$3@localhost.localdomain> <j0kilj$8bg$4@localhost.localdomain> <j0v8t7$os9$1@localhost.localdomain> |
On 29/07/11 22:32, 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. That is in conflict with my findings. If you look at the message I posted, with the code I sent, you'll see that I set mail.smtp.host to yahoo.com. However, in Transport.connect() I explicitly connect to our mail server, overriding the value in the mail.smtp.host property. This worked for me, as I mentioned in the post. If I comment out that line, so mail.smtp.host is unset, it still connects to our mail server as per the Transport.connect() host setting. 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)? -- Nigel Wade
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
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? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-01 12:54 +0000
csiph-web