jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <gl...@mail.more.net>
Subject Re: cvs commit: jakarta-taglibs/mailer/src/org/apache/taglibs/mailer MailTag.java
Date Thu, 29 Jan 2004 20:09:14 GMT
Martin,

Thanks for taking over the Mailer taglib.  There are many
ways it could be improved. Support for EL would be nice for
one thing.

There is a reason why Session.getDefaultInstance() was used.
This was for a virtual hosted environment to make sure that the
resource provider for the mail session could set headers, etc.
to make it easier to track what virtual host the email originated
from in case any complaints came in to postmaster or abuse.

I am -1 for this patch as it is now.  Perhaps there is a better
solution that would allow either to be used, with the ability
to prevent the Session.getInstance() by the application sever
admin. That may be possible by using the java security policy.

Regards,

Glenn

On Thu, Jan 29, 2004 at 06:29:00AM -0000, martinc@apache.org wrote:
> 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
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

---------------------------------------------------------------------
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