jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mart...@apache.org
Subject cvs commit: jakarta-taglibs/mailer/src/org/apache/taglibs/mailer MailTag.java
Date Thu, 29 Jan 2004 06:29:00 GMT
martinc     2004/01/28 22:29:00

  Modified:    mailer/src/org/apache/taglibs/mailer MailTag.java
  Log:
  Use getInstance() rather than getDefaultInstance() to obtain the JavaMail
  session, so that we have control over the instance (as opposed to picking
  up a JVM-wide session).
  
  PR: 24715
  Submitted by: Daniel Abayev (dabayev at factset.com)
  
  Revision  Changes    Path
  1.12      +5 -5      jakarta-taglibs/mailer/src/org/apache/taglibs/mailer/MailTag.java
  
  Index: MailTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/mailer/src/org/apache/taglibs/mailer/MailTag.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- MailTag.java	29 Jan 2004 06:18:11 -0000	1.11
  +++ MailTag.java	29 Jan 2004 06:29:00 -0000	1.12
  @@ -420,10 +420,10 @@
                       // create the session with an authenticator object
                       // better way to do authentication
                       props.put("mail.smtp.auth", "true");
  -                    sessionobj = Session.getDefaultInstance(props,
  +                    sessionobj = Session.getInstance(props,
                                            new MailAuthenticator(user, password));
               } else
  -                sessionobj = Session.getDefaultInstance(props, null);
  +                sessionobj = Session.getInstance(props, null);
   
               message = new MimeMessage(sessionobj);
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


Mime
View raw message