[jboss-cvs] jboss-seam/src/mail/org/jboss/seam/mail ...

Peter Muir peter at bleepbleep.org.uk
Wed Jan 31 10:22:54 EST 2007


  User: pmuir   
  Date: 07/01/31 10:22:54

  Modified:    src/mail/org/jboss/seam/mail  MailSession.java
  Log:
  Tidy up, fix bug with setting port
  
  Revision  Changes    Path
  1.5       +1 -6      jboss-seam/src/mail/org/jboss/seam/mail/MailSession.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MailSession.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/mail/org/jboss/seam/mail/MailSession.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- MailSession.java	29 Jan 2007 01:11:07 -0000	1.4
  +++ MailSession.java	31 Jan 2007 15:22:54 -0000	1.5
  @@ -10,7 +10,6 @@
   import javax.mail.PasswordAuthentication;
   import javax.mail.Session;
   import javax.naming.NamingException;
  -
   import org.jboss.seam.Component;
   import org.jboss.seam.InterceptionType;
   import org.jboss.seam.annotations.Create;
  @@ -50,7 +49,6 @@
      {
         if ( session==null ) 
         {
  -         // TODO Is this the best way to do this?
            // This simulates an EVENT scope component
            return  (Session) Naming.getInitialContext().lookup( getSessionJndiName() );
         }
  @@ -90,9 +88,7 @@
         	properties.put("mail.host", getHost());
         }
         if ( getPort()!=null ) {
  -      	properties.put("mail.smtp.port", getPort());
  -      	properties.put("mail.imap.port", getPort());
  -      	properties.put("mail.pop3.port", getPort());
  +      	properties.put("mail.smtp.port", getPort().toString());
         }
     
         if ( getUsername()!=null && getPassword()==null )
  @@ -121,7 +117,6 @@
         
         // Use TLS (if supported) by default.
         properties.put("mail.smtp.starttls.enable", "true");
  -      properties.put("mail.imap.starttls.enable", "true");
     
         session = javax.mail.Session.getInstance(properties, authenticator);
         session.setDebug( isDebug() );
  
  
  



More information about the jboss-cvs-commits mailing list