Does JavaMail "connect" require a password?
According to
http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp/package-summary.html, a
method used for JavaMail requires a password:
tr.connect(smtphost, username, password);
I had dutifully included the appropriate password, but today found that my
hosting company had changed the password with no prior notice. While
testing to see what functionality of the domain they had blithely disabled,
I was surprised to find that JavaMail still worked, even with the defunct
password.
Are there conditions under which the JavaMail ignores the password in the
connect method, or is there something strange going on here?
A few weeks ago I changed the first parameter of the connect method to
"localhost" as a workaround for a glitch in which the server suddenly
started delaying regular email for hours and intermittently not sending
JavaMail at all. The hosting company suggested using "localhost" as the
first parameter in the connect method as a workaround for the unexplained
flakiness of their servers. I don't know if this removes the need for a
password.
.
Relevant Pages
- Re: JavaMail, Exchange Server - Unable to relay
... This is not a JavaMail problem. ... It indicates that your mail server is not configured to allow ... the question is whether JavaMail can do SMTP Authentication using ... (comp.lang.java.programmer) - Re: Does JavaMail "connect" require a password?
... Could this be that your host's smtp server is badly configured to allow ... i guess javamail won't send the password if the ... (comp.lang.java.programmer) - Re: JavaMail, Exchange Server - Unable to relay
... >> to those external email addresses using that Exchange machine as ... > In my server, once I am authenticated, I can relay from any address, ... > javamail into debug mode and study the output to see where it's ... I managed to send email to external email addresses, ... (comp.lang.java.programmer) - Re: JavaMail, Exchange Server - Unable to relay
... > authentication part since there's no exception thrown by JavaMail on ... > When I'm sending using JavaMail, the Exchange server says it is unable to ... > that's in the same domain as the Exchange server. ... (comp.lang.java.programmer) - Re: Does JavaMail "connect" require a password?
... While testing to see what functionality of the domain they had blithely disabled, I was surprised to find that JavaMail still worked, even with the defunct password. ... A few weeks ago I changed the first parameter of the connect method to "localhost" as a workaround for a glitch in which the server suddenly started delaying regular email for hours and intermittently not sending JavaMail at all. ... Could this be that your host's smtp server is badly configured to allow non authenticated users to send email? ... (comp.lang.java.programmer) |
|