On Mon, Jun 30, 2008 at 4:21 PM, Ryan de Laplante <[EMAIL PROTECTED]> wrote:
> 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");
...
> 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.
I don't believe you can set username/password for container managed
mail sessions on Tomcat or Glassfish. That's why we have the plain old
mail setup (i.e. not container managed, not JNDI), which does allow
you to set username/password -- but does not do anything to configure
SSL (your code example doesn't seem to do SSL either).
Here's what you'd add to your roller-custom.properties file to setup
mail with username and password:
mail.configurationType=properties
mail.hostname=smtp-server.example.com
mail.username=scott
mail.password=tiger
- Dave