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]

Reply via email to