Lists all of the journal entries for the day.

Thu, 10 Aug 2006

2:50 PM - Javamail api source

I've had a hell of a time getting just journal to authenticate against the mail server.  This code helped me:

Its the actual implementation code for the Session. 

For those out there who want to know how to do this, here's a brief rundown. 

  1. Create a properties object. 
  2. add, mail.smtp,user, mail.smtp.auth "true", mail.smtp.port properties with the values you need. 
  3. Create a Session using Session.getInstance( your properties class, a class instance called ForcedAuthenticator())
  4. Create a message as normal.  I called saveChanges() although that should be automatic. 
  5. Make an address array with your to internetaddress in it
  6. Create a transport instance using session.getTransport("smtp")  where session is your session variable.
  7. i called transport t..    t.connect(); t.sendMessage(message,a); t.close();    // a is the to address
  8. catch your exceptions
  9. ForcedAuthenticator extends Authenticator and you need a method called getPasswordAuthentication()  which returns a new object using the username/password.
I will put this in cvs too.  I read something about managing the sessions if you don't use getDefaulInstance() but i can't find an example.


8:21 PM - (no subject)

I just had dinner about 45 minutes ago. Caryn's playing WoW as usual. I spent most of the day working on Pytox's site.