2008/11/27 Rainer Frey <[EMAIL PROTECTED]>:
> On Thursday 27 November 2008 12:52:56 Lyallex wrote:
>
>
> (It would be easier to answer if you'd stop top quoting - but I won't correct
> this whole mail)

Well that's most kind of you, you are being very patient.

I think I need to take a step back here. The boss is happy that
sending email from within the application is now working. I on the
other hand want to know why something that works in Tomcat 5 doesn't
work in Tomcat 6. He's less than inclined to pay for that information
however :-(

Anyway, I will certainly do some more testing, maybe install a clean
Tomcat 6 and create a simple web app that just sends email to a
preconfigured address ... whatever, I'll post results here including
code, mail debug and anything else that might help

Thanks again for your time

lyallex

>
>> 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.
>> The mail server does not require authentication when accessed from the
>> office subnet. The server guys have confirmed this.
>
> So the problem is certainly on Java side.
>
>> 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.
>
> It then should not be anything related to Javamail or Java version,
> incompatible jar files ...
>
>> 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
>
> In such a setup, a javamail session is no managed resource for tomcat. I can't
> imagine how the tomcat version could have any influence on that. There must
> be any other difference between your eclipse runtime and this failing tomcat.
>
>> 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).
>
> Is there any other webapp that might set system properties with mail related
> content? I'd make sure and use an empty Properties object for your test. the
> only reason to use System.getProperties() is the ability to pass JavaMail
> configuration to the JVM command line. I'm not sure what static variables and
> Singletons Javamail has, so I'd test without the resource configuration (even
> if you don't use it anyway) and the Javamail jars in WEB-INF/lib. If this is
> not successful, I guess it's impossible to help unless you post more code,
> complete exception messages and perhaps the output of Javamail with
> mail.debug=true. As I think it is not directly related to tomcat, I'd
> recommend asking on the Javamail list though, they might know more details.
>
> Rainer
>
>>
>> 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]
>
> ---------------------------------------------------------------------
> 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]

Reply via email to