roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan de Laplante <r...@ijws.com>
Subject Setting up JavaMail datasource with SSL, username and password
Date Mon, 30 Jun 2008 20:21:37 GMT
Hi,

I'm having difficulty figuring out how to set up a JavaMail datasource 
that uses TLS SSL, username and password.  To do this in JavaCode:

>      ...
>         Properties props = new Properties();
>         props.put("mail.smtp.auth", "true");
>         props.put("mail.smtp.host", "smtp.host.foo");
>         props.put("mail.smtp.port", "587");
>         props.put("mail.from", "foo@bar.com");
>
>         Authenticator auth = Utils.getAuthenticator();
>         Session session = Session.getInstance(props, auth);
>         session.setDebug(false);
>         ...
>
>
>
>     public static Authenticator getAuthenticator() {
>         return new Authenticator() {
>             @Override
>             protected PasswordAuthentication 
> getPasswordAuthentication() {
>                 return new PasswordAuthentication(user, password);
>             }
>         };
>     } 

It looks like it can't be done simply by adding properties to the 
JavaMail DataSource since the roller app needs to be able to use the 
username and password.   Does Roller have such a feature?

BTW I'm using GlassFish V2.


Thanks,
Ryan



Mime
View raw message