Thanks Scott,

 try
  {
   javax.naming.Context env = (Context) new javax.naming.InitialContext
().lookup("java:comp/env");
         session = (javax.mail.Session) env.lookup("mail/MailSession");
  }
  catch (javax.naming.NamingException e)
  {
   log.debug("failed to lookup mail mail/MailSession in
resin.conf"+e.getMessage());
   properties.put("mail.smtp.host","localhost");
      session = Session.getDefaultInstance(properties);
   log.debug(mailhost);
  }

It looks like mail.smtp.password & mail.smtp.user arent used, mainly because
the authentication comes from *javax.mail.PasswordAuthentication.*



**


On Jan 15, 2008 4:31 AM, Scott Ferguson <[EMAIL PROTECTED]> wrote:

>
>   On Jan 12, 2008, at 6:21 PM, Ron Pitts wrote:
>
>  I've setup a entry wiithn resin.conf as follows
>
>    <resource jndi-name="mail/MailSession" type="javax.mail.Session">
>   <init>
>    <mail.store.protocol>imap</mail.store.protocol>
>    <mail.transport.protocol>smtp</mail.transport.protocol>
>    <mail.imap.host>somedomain.com</mail.imap.host>
>    <mail.pop3.host>somedomain.com</mail.pop3.host>
>    <mail.smtp.host >somedomain.com</mail.smtp.host>
>    <mail.smtp.password>somepassword</mail.smtp.password>
>             <mail.smtp.user>someuser</mail.smtp.user>
>             <mail.smtp.auth>true</mail.smtp.auth>
>    </init>
>    </resource>
>
> However, I'm getting javax.mail.AuthenticationFailedException when trying
> to send the message, looks like I cant use JNDI to pass the username &
> password because it requires some Authenticator object?
>
>
> I've added a bug report as http://bugs.caucho.com/view_all_bug_page.php
>
> I think we'll want a <mail-session> tag to make this clearer.
>
> I'm not sure what the Authenticator issue is.  It's not related to Resin's
> authenticators.  As a workaround, you might need to set the
> <system-property> values instead.
>
> -- Scott
>
>
> thanks
>
>
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to