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

Peter Muir peter at bleepbleep.org.uk
Mon Aug 13 16:21:03 EDT 2007


  User: pmuir   
  Date: 07/08/13 16:21:03

  Modified:    src/main/org/jboss/seam/mail  MailSession.java
  Log:
  JBSEAM-1795
  
  Revision  Changes    Path
  1.13      +16 -2     jboss-seam/src/main/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/main/org/jboss/seam/mail/MailSession.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- MailSession.java	8 Jul 2007 21:13:37 -0000	1.12
  +++ MailSession.java	13 Aug 2007 20:21:02 -0000	1.13
  @@ -43,6 +43,7 @@
   	private boolean debug = false;
      private String sessionJndiName;
      private boolean ssl;
  +   private boolean tls = true;
   
      @Unwrap
      public Session getSession() throws NamingException
  @@ -159,8 +160,11 @@
         	};
         }
         
  -      // Use TLS (if supported) by default.
  +      // Use TLS (if supported)
  +      if (isTls())
  +      {
         properties.put("mail.smtp.starttls.enable", "true");
  +      }
     
         session = javax.mail.Session.getInstance(properties, authenticator);
         session.setDebug( isDebug() );
  @@ -260,6 +264,16 @@
         this.ssl = ssl;
      }
   
  +   public boolean isTls()
  +   {
  +      return tls;
  +   }
  +   
  +   public void setTls(boolean tls)
  +   {
  +      this.tls = tls;
  +   }
  +
      public static Session instance() 
      {
         return (Session) Component.getInstance(MailSession.class);
  
  
  



More information about the jboss-cvs-commits mailing list