Commons-mail is in the sandbox, however it hasn't been built in a while. I use it all the time actually, and have a small patch for it. (http://jakarta.apache.org/commons/sandbox/email/) It is one of those small little packages that really exemplify what commons is all about.
my only complaint about it is that I can't pass the mail objects a Session to use, and I want to pull the session out of my Tomcat JNDI stuff. I have a small patch attached that I want to get into commons-email.
Do we want to refactor Turbine to use commons email? I think that was the original plan. If so, I volunteer to do it, just need a go ahead from a committer.
Eric
-----Original Message-----
From: Quinton McCombs [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 3:03 PM
To: Turbine Developers List
Subject: RE: MultiPartMail has dependancy on Torque?????
Commons-mail? I don't see that in commons or sommons-sandbox.
> -----Original Message-----
> From: Daniel Rall [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 06, 2003 1:54 PM
> To: Turbine Developers List
> Subject: Re: MultiPartMail has dependancy on Torque?????
>
>
> Gross! Not sure. You could take a gander at the Commons
> Mail package which Jon factored out of T2 for T3 and see what
> it looks like there.
>
> "Quinton McCombs" <[EMAIL PROTECTED]> writes:
>
> > Does anyone know why
> org.apache.turbine.util.mail.MultiPartEmail has a
> > dependancy on Torque??? Is this really supposed to be the Criteria
> > object from Torque?
> >
> > /**
> > * Constructor used to initialize attributes.
> > *
> > * <p>This method uses the criteria object to set the different
> > * fields of the e-mail. The expected fields of the
> Criteria are:
> > *
> > * <ul>
> > * <li>SENDER_EMAIL</li>
> > * <li>RECEIVER_EMAIL</li>
> > * <li>EMAIL_SUBJECT</li>
> > * <li>EMAIL_BODY</li>
> > * <li>ATTACHMENTS - A Vector of EmailAttachment.</li>
> > * <li>FILE_SERVER - Where the files are located. If not given,
> > * they are assumed to be local.</li>
> > * </ul>
> > *
> > * Deprecated, since Criteria is deprecated in mail API.
> > *
> > * @param criteria A Criteria.
> > * @exception MessagingException.
> > */
> > public MultiPartEmail(Criteria criteria)
> > throws MessagingException
> > {
> > this.init();
> > this.initCriteria(criteria);
> > }
> >
> > /**
> > * Uses the criteria to set the fields.
> > *
> > * <p>This method uses the criteria object to set the different
> > * fields of the e-mail. The expected fields of the
> Criteria are:
> > *
> > * <ul>
> > * <li>SENDER_EMAIL</li>
> > * <li>RECEIVER_EMAIL</li>
> > * <li>EMAIL_SUBJECT</li>
> > * <li>EMAIL_BODY</li>
> > * <li>ATTACHMENTS - A Vector of EmailAttachment.</li>
> > * <li>FILE_SERVER - Where the files are located. If not given,
> > * they are assumed to be local.</li>
> > * </ul>
> > *
> > * Deprecated, since the Criteria is deprecated.
> > *
> > * @param criteria A Criteria.
> > * @exception MessagingException.
> > */
> > protected void initCriteria( Criteria criteria )
> > throws MessagingException
> > {
> > super.initCriteria(criteria);
> >
> > if (criteria.containsKey(EMAIL_BODY))
> > {
> > setMsg(criteria.getString(EMAIL_BODY));
> > }
> > else
> > {
> > setMsg("NO MESSAGE");
> > }
> >
> > Vector attachments;
> >
> > if (criteria.containsKey(ATTACHMENTS))
> > {
> > attachments = (Vector) criteria.get(ATTACHMENTS);
> > }
> > else
> > {
> > attachments = new Vector();
> > }
> >
> > if (criteria.containsKey(FILE_SERVER))
> > {
> > fileServer = criteria.getString(FILE_SERVER);
> > }
> >
> > for (int i = 0; i < attachments.size(); i++)
> > {
> > EmailAttachment attachment =
> > (EmailAttachment) attachments.elementAt(i);
> > attach(attachment);
> > }
> > }
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> --
>
> Daniel Rall <[EMAIL PROTECTED]>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
