Dale,

Can you confirm that you are using JNDI to lookup the MailSession with the
location "java:comp/env/mail/MailSession"? If you are not, you may be using
a MailSession you're not expecting. That's my only suggestion anyway - if
you are already using this location, ignore me :)

-Joe Walnes


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Dale Bronk
Sent: 09 September 2000 04:12
To: Orion-Interest
Subject: 3rd post, no answer


Sorry to keep posting this, but I really need an answer.

I have a problem that I hope isn't not normal behavior and something I have
configured incorrectly.

Snip of my sever.xml:
 <global-application name="MyDomain"
path="c:\webapps\mydomain-web-app\config\mydomain-application.xml" />-->
 <application name="Client1Domain"
path="c:\webapps\Client1Domain-web-app\config\Client1Domain-application.xml"
/>
 <application name="Client2Domain"
path="c:\webapps\Client2Domain-web-app\config\Client2Domain-application.xml"
/>
 <application name="Client3Domain"
path="c:\webapps\Client3Domain-web-app\config\Client3Domain-application.xml"
/>
 <application name="Client4Domain"
path="c:\webapps\Client4Domain-web-app\config\Client4Domain-application.xml"
/>
 <application name="Client5Domain"
path="c:\webapps\Client5Domain-web-app\config\Client5Domain-application.xml"
/>

In mydomain-application.xml, I have: (note that this is my global
application)
   <mail-session location="mail/MailSession" smtp-host="mail.mydomain.com">
      <property name="mail.transport.protocol" value="smtp" />
      <property name="mail.smtp.from" value="[EMAIL PROTECTED]" />
      <property name="mail.from" value="[EMAIL PROTECTED]" />
   </mail-session>

Now I want to also place the same mail session entries in each of my clients
application.xml files except specifying their domain:
   <mail-session location="mail/MailSession"
smtp-host="mail.Client1Domain.com">
      <property name="mail.transport.protocol" value="smtp" />
      <property name="mail.smtp.from" value="[EMAIL PROTECTED]" />
      <property name="mail.from" value="[EMAIL PROTECTED]" />
   </mail-session>

I have a FormMailServlet that I install on all my clients web.xml files
which uses mail.jar classes send the email.  My problem is it doesn't matter
which one I go to, Orion always uses my mail-session entries from the global
application.  It doesn't seem to get over written for each other
application.  I also tried to explicitly set the mail server in my
FormMailServet to what is passed in.  I pass in mail.Client1Domain.com and
inside my class I do the following:
      properties.put( "mail.smtp.host", "mail.Client1Domain.com");
      properties.put( "smtp-host", "mail.Client1Domain.com");   // Not
needed as far as I know

I also turn verbose on so I can see what is happening.  It always uses
mail.mydomain.com!  If I comment out the mail-session entries from my global
application xml then it works fine as long as I pass in the value and
explicitly set the mail.smtp.host as above.  In other words, it seems to
ignore the mail-session in the Clientxxx-application.xml files as I pointed
the smtp-host entry in one of the application.xml files to an existing
server, but a different one.  When I explicitly set the entries it uses the
entries I set, not the mail-session entries.

Seems to only use the mail-session entries only if in the global application
xml file and no where else.  When in the global application xml file, it
seems you can only use that one even if I explicitly set it to a different
one.

What gives?  Sorry for the long email, but I wanted to be sure to give all
the data.

Dale Bronk


Dale Bronk
[EMAIL PROTECTED]
Windscape Consulting, Inc.
http://www.windscape.com


Reply via email to