Return-Path: Delivered-To: apmail-roller-user-archive@www.apache.org Received: (qmail 44645 invoked from network); 30 Jun 2008 20:26:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jun 2008 20:26:34 -0000 Received: (qmail 17979 invoked by uid 500); 30 Jun 2008 20:26:36 -0000 Delivered-To: apmail-roller-user-archive@roller.apache.org Received: (qmail 17705 invoked by uid 500); 30 Jun 2008 20:26:35 -0000 Mailing-List: contact user-help@roller.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@roller.apache.org Delivered-To: mailing list user@roller.apache.org Received: (qmail 17694 invoked by uid 99); 30 Jun 2008 20:26:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jun 2008 13:26:35 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ryan@ijws.com designates 142.46.57.114 as permitted sender) Received: from [142.46.57.114] (HELO ns2.ijws.com) (142.46.57.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jun 2008 20:25:43 +0000 Received: from cpe001ebee368cf-cm000f9f7b7c5c.cpe.net.cable.rogers.com ([72.140.245.82] helo=[192.168.100.100]) by ns2.ijws.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1KDPtl-00054s-Rn for user@roller.apache.org; Mon, 30 Jun 2008 16:22:53 -0400 Message-ID: <48694051.30507@ijws.com> Date: Mon, 30 Jun 2008 16:21:37 -0400 From: Ryan de Laplante User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: user@roller.apache.org Subject: Setting up JavaMail datasource with SSL, username and password Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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