0 Replies Latest reply on Apr 23, 2003 9:05 AM by ikloeckl

    Mail resource security

    ikloeckl

      Hi,
      it seems that if I want to use a secured mail resource (a SMTP server which requires authentication), I have to get a javax.mail.Transport object to perform a connect with the required login data:

      <get mail session from JNDI>
      Transport oTransport = <get Transport from mail session object>
      oTransport.connect("host", "user", "pwd");

      It seems to me that I have to declare such a resource reference with <res-auth>Application</res-auth>, because all login data are supplied in the application code.

      My question is: can I configure the mail resource so that <res-auth>Container</res-auth> is possible? I mean, are there attributes I can set in the service file, e.g. a "passwd" Parameter? (I know that I can leave the host and user field of the connect call blank or null, then the system properties mail.smtp.host and mail.smtp.user are used, and these can be configured in the service file - but I think container authentication should run simply with a totally empty connect() call ...)

      Thanks very much,
      Ingo