On Tuesday 25 November 2008 15:09:54 Lyallex wrote: > Hello again > > 2008/11/19 Don Millhofer <[EMAIL PROTECTED]>: > > Are you sure that the mail server, serving the host you are deploying to > > does not require authentication? I got this same error trying to go > > through the Google Mail Server without proper authentication. > > I am absolutely sure that the mail server I am using for the > standalone test is the same one that I am using for the tomcat server.
This is no answer to above question. > I tried setting mail.smtp.auth = true and the send failed in Eclipse, > the debug output was exactly the same as when I run the code > in Tomcat Authentication failure Are you running Tomcat on the same machine as Eclipse? The mail server may require authentication for some machines, but not for others > > I then hardcoded properties.put("mail.smtp.auth", "false"); in the > MailServer constructor and ran the Eclipse test, it worked, so I ran > it in Tomcat and it failed with Authentication exception .... > > In the MailServer constructor I do the following > > properties = System.getProperties(); > ... > properties.put("mail.smtp.auth", "false"); > > so it looks like a different properties bundle is being used when I > run this in Tomcat ... does any of this make sense ?? Tomcat does not automagically change your code. If this is passed in your code, it is used. > > You say in Eclipse you use - (mail.smtp.auth = false) and sends the > > email. Try sending authentication. > > > > private class SMTPAuthenticator extends javax.mail.Authenticator { > > @ Override > > public PasswordAuthentication getPasswordAuthentication() { > > return new PasswordAuthentication(d_email, d_password); > > } > > } Did you try that? If the mail server says it wants authentication, it's no use forcing JavaMail to not authenticate. > > Thanks > lyallex Rainer --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]