OK, firstly thanks for the feedback so far Let me be quite clear about one thing. I am using the same mail server in both cases. Tomcat and Eclipse are running on the same physical device with the same IP address.
If I configure a JavaMail session as described in the following resource http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html (JavaMail section) and set auth to false in context.xml everything works perfectly when sending mail from the web application. When I try to send mail with my mail component cofigured to work without using the configured session it fails with Authentication failed To sum up then The mail server does not require authentication when accessed from the office subnet. The server guys have confirmed this. I am using the same mail server for the standalone test, the test where the mail component is configured to use the JNDI resource configured in context.xml and the test where the mail component uses the same configuration mechanism as the standlone test. The only test that fails is the last one. Something has changed since Tomcat 5. I have exactly the same component running in several webapps on Tomcat 5 servers without any need to configure JNDI resources/Mail sessions etc JAVA_OPTS and CATALINA_OPTS have not been modified by me and do not contain anything other that the default settings (none of which appear to have anything to do with mail config settings). Any ideas much appreciated. lyallex 2008/11/26 Rainer Frey <[EMAIL PROTECTED]>: > On Wednesday 26 November 2008 08:37:14 Rainer Frey wrote: >> > 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 ?? > > Argh, I overlooked that you use System.getProperties() here. If you specify > any JavaMail related Properties in JAVA_OPTS or CATALINA_OPTS environment > variables, this will be different indeed. You might want to check your tomcat > start script. > > 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] > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]