Paul, thanks for the suggestion.

I've searched the forums and googled the web, and seems authentication function 
is needed for sending emails. My impression is that sending email is more 
complicated, as a function getPasswordAuthentication needs to be overridden. 
Not sure how to port that to coldfusion.

=============
Session session = Session.getDefaultInstance(props, new Authenticator(){
      protected PasswordAuthentication getPasswordAuthentication() {
          return new PasswordAuthentication(username, password);
      }});
============

As for fetching emails, seems the following java code is needed to handle the 
ssl settings, I ported to coldfusion, but didn't work.

======================
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
  final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";

  // Get a Properties object
  Properties props = System.getProperties();
  props.setProperty("mail.pop3.socketFactory.class", SSL_FACTORY);
  props.setProperty("mail.pop3.socketFactory.fallback", "false");
  props.setProperty("mail.pop3.port", "995");
  props.setProperty("mail.pop3.socketFactory.port", "995");
=======================

Hua 

-----Original Message-----
From: Paul Hastings [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 30, 2005 1:51 PM
To: CF-Talk
Subject: Re: Using JavaMail to send/fetch emails via SSL

RADEMAKERS Tanguy wrote:
  > Have you tried using JavaMail to fetch email from a different (non
> gmail) ssl mail server?  I.E. is the problem gmail specific? BTW: your 
> debug output ("DEBUG POP3: connecting to host "pop.gmail.com", port 
> 995, isSSL false") seems to indicate that you are *not* connecting 
> over SSL...

it's been a while since i looked at SSL but if i recall correctly to 
authenticate SSL in javamail you need to create & pass in an authentication 
function. i'm at home, no access to any code but if you search the javamail 
section on jguru or sun's java mail forums there should be examples.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216850
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to