<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/mail.jar</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -8,5 +8,6 @@
 	&lt;classpathentry kind=&quot;lib&quot; path=&quot;lib/scala-actors.jar&quot;/&gt;
 	&lt;classpathentry kind=&quot;lib&quot; path=&quot;lib/servlet-api.jar&quot;/&gt;
 	&lt;classpathentry kind=&quot;lib&quot; path=&quot;lib/derby-10.2.2.0.jar&quot;/&gt;
+	&lt;classpathentry kind=&quot;lib&quot; path=&quot;lib/mail.jar&quot;/&gt;
 	&lt;classpathentry kind=&quot;output&quot; path=&quot;bin&quot;/&gt;
 &lt;/classpath&gt;</diff>
      <filename>.classpath</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,3 @@
-#Wed Feb 28 20:51:32 PST 2007
+#Fri Mar 02 08:05:46 PST 2007
 eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala,*.scala</diff>
      <filename>.settings/org.eclipse.jdt.core.prefs</filename>
    </modified>
    <modified>
      <diff>@@ -12,3 +12,312 @@ http://www.scala-lang.org/downloads/license.html
 *** Prototype and Scriptaculous ***
 Distributed under an MIT license
 
+*** JavaMail (lib/javamail.jar) ***
+Sun Microsystems, Inc. (&quot;Sun&quot;) ENTITLEMENT for SOFTWARE
+
+Licensee/Company: Entity receiving Software.
+
+Effective Date: Date of delivery of the Software to You.
+
+Software: JavaMail 1.4.
+
+License Term:  Perpetual (subject to termination under the SLA).
+
+Licensed Unit: Software Copy.
+
+Licensed unit Count: Unlimited.
+
+Permitted Uses:
+
+1. You may reproduce and use the Software for Individual, Commercial,
+or Research and Instructional Use for the purposes of designing,
+developing, testing, and running Your applets and
+application(&quot;Programs&quot;).
+
+2. Subject to the terms and conditions of this Agreement and
+restrictions and exceptions set forth in the Software's documentation,
+You may reproduce and distribute portions of Software identified as a
+redistributable in the documentation (&quot;Redistributable&quot;), provided
+that:
+
+(a) you distribute Redistributable complete and unmodified and only
+bundled as part of Your Programs,
+
+(b) your Programs add significant and primary functionality to the
+Redistributable,
+
+(c) you distribute Redistributable for the sole purpose of running your
+Programs,
+
+(d) you do not distribute additional software intended to replace any
+component(s) of the Redistributable,
+
+(e) you do not remove or alter any proprietary legends or notices
+contained in or on the Redistributable.
+
+(f) you only distribute the Redistributable subject to a license
+agreement that protects Sun's interests consistent with the terms
+contained in this Agreement, and
+
+(g) you agree to defend and indemnify Sun and its licensors from and
+against any damages, costs, liabilities, settlement amounts and/or
+expenses  (including attorneys' fees) incurred in connection with any
+claim, lawsuit or action by any third party that arises or results from
+the use or distribution of any and all Programs and/or
+Redistributable.
+
+3. Java Technology Restrictions.  You may not create, modify, or change
+the behavior of, or authorize your licensees to create, modify, or
+change the behavior of, classes, interfaces, or subpackages that are in
+any way identified as &quot;java&quot;, &quot;javax&quot;, &quot;sun&quot; or similar convention as
+specified by Sun in any naming convention designation.
+
+B. Sun Microsystems, Inc. (&quot;Sun&quot;)
+SOFTWARE LICENSE AGREEMENT
+
+READ THE TERMS OF THIS AGREEMENT (&quot;AGREEMENT&quot;) CAREFULLY BEFORE OPENING
+SOFTWARE MEDIA PACKAGE. BY OPENING SOFTWARE MEDIA PACKAGE, YOU AGREE TO
+THE TERMS OF THIS AGREEMENT. IF YOU ARE ACCESSING SOFTWARE
+ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY SELECTING
+THE &quot;ACCEPT&quot; BUTTON AT THE END OF THIS AGREEMENT. IF YOU DO NOT AGREE
+TO ALL OF THE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE
+OF PURCHASE FOR A REFUND OR, IF SOFTWARE IS ACCESSED ELECTRONICALLY,
+SELECT THE &quot;DECLINE&quot; (OR &quot;EXIT&quot;) BUTTON AT THE END OF THIS AGREEMENT.
+IF YOU HAVE SEPARATELY AGREED TO LICENSE TERMS (&quot;MASTER TERMS&quot;) FOR
+YOUR LICENSE TO THIS SOFTWARE, THEN SECTIONS 1-5 OF THIS AGREEMENT
+(&quot;SUPPLEMENTAL LICENSE TERMS&quot;) SHALL SUPPLEMENT AND SUPERSEDE THE
+MASTER TERMS IN RELATION TO THIS SOFTWARE.
+
+1.      Definitions.
+
+(a)     &quot;Entitlement&quot; means the collective set of applicable documents
+authorized by Sun evidencing your obligation to pay associated fees (if
+any) for the license, associated Services, and the authorized scope of
+use of Software under this Agreement.
+
+(b)     &quot;Licensed Unit&quot; means the unit of measure by which your use of
+Software and/or Service is licensed, as described in your Entitlement.
+
+(c)     &quot;Permitted Use&quot; means the licensed Software use(s) authorized
+in this Agreement as specified in your Entitlement. The Permitted Use
+for any bundled Sun software not specified in your Entitlement will be
+evaluation use as provided in Section 3.
+
+(d)     &quot;Service&quot; means the service(s) that Sun or its delegate will
+provide, if any, as selected in your Entitlement and as further
+described in the applicable service listings at
+www.sun.com/service/servicelist.
+
+(e)     &quot;Software&quot; means the Sun software described in your
+Entitlement. Also, certain software may be included for evaluation use
+under Section 3.
+
+
+(f)     &quot;You&quot; and &quot;Your&quot; means the individual or legal entity specified
+in the Entitlement, or for evaluation purposes, the entity performing
+the evaluation.
+
+2.      License Grant and Entitlement.
+
+Subject to the terms of your Entitlement, Sun grants you a
+nonexclusive, nontransferable limited license to use Software for its
+Permitted Use for the license term. Your Entitlement will specify (a)
+Software licensed, (b) the Permitted Use, (c) the license term, and (d)
+the Licensed Units.
+
+Additionally, if your Entitlement includes Services, then it will also
+specify the (e) Service and (f) service term.
+
+If your rights to Software or Services are limited in duration and the
+date such rights begin is other than the purchase date, your
+Entitlement will provide that beginning date(s).
+
+The Entitlement may be delivered to you in various ways depending on
+the manner in which you obtain Software and Services, for example, the
+Entitlement may be provided in your receipt, invoice or your contract
+with Sun or authorized Sun reseller. It may also be in electronic
+format if you download Software.
+
+3.      Permitted Use.
+
+As selected in your Entitlement, one or more of the following Permitted
+Uses will apply to your use of Software. Unless you have an Entitlement
+that expressly permits it, you may not use Software for any of the
+other Permitted Uses. If you don't have an Entitlement, or if your
+Entitlement doesn't cover additional software delivered to you, then
+such software is for your Evaluation Use.
+
+(a) Evaluation Use. You may evaluate Software internally for a period
+of 90 days from your first use.
+
+(b) Research and Instructional Use. You may use Software internally to
+design, develop and test, and also to provide instruction on such
+uses.
+
+(c) Individual Use. You may use Software internally for personal,
+individual use.
+
+(d) Commercial Use. You may use Software internally for your own
+commercial purposes.
+
+(e) Service Provider Use. You may make Software functionality
+accessible (but not by providing Software itself or through outsourcing
+services) to your end users in an extranet deployment, but not to your
+affiliated companies or to government agencies.
+
+4.      Licensed Units.
+
+Your Permitted Use is limited to the number of Licensed Units stated in
+your Entitlement. If you require additional Licensed Units, you will
+need additional Entitlement(s).
+
+5.	Restrictions.
+
+(a) The copies of Software provided to you under this Agreement are
+licensed, not sold, to you by Sun. Sun reserves all rights not
+expressly granted. (b) You may make a single archival copy of Software,
+but otherwise may not copy, modify, or distribute Software. However if
+the Sun documentation accompanying Software lists specific portions of
+Software, such as header files, class libraries, reference source code,
+and/or redistributable files, that may be handled differently, you may
+do so only as provided in the Sun documentation. (c) You may not rent,
+lease, lend or encumber Software. (d) Unless enforcement is prohibited
+by applicable law, you may not decompile, or reverse engineer Software.
+(e) The terms and conditions of this Agreement will apply to any
+Software updates, provided to you at Sun's discretion, that replace
+and/or supplement the original Software, unless such update contains a
+separate license. (f) You may not publish or provide the results of any
+benchmark or comparison tests run on Software to any third party
+without the prior written consent of Sun. (g) Software is confidential
+and copyrighted. (h) Unless otherwise specified, if Software is
+delivered with embedded or bundled software that enables functionality
+of Software, you may not use such software on a stand-alone basis or
+use any portion of such software to interoperate with any program(s)
+other than Software. (i) Software may contain programs that perform
+automated collection of system data and/or automated software updating
+services. System data collected through such programs may be used by
+Sun, its subcontractors, and its service delivery partners for the
+purpose of providing you with remote system services and/or improving
+Sun's software and systems. (j) Software is not designed, licensed or
+intended for use in the design, construction, operation or maintenance
+of any nuclear facility and Sun and its licensors disclaim any express
+or implied warranty of fitness for such uses. (k) No right, title or
+interest in or to any trademark, service mark, logo or trade name of
+Sun or its licensors is granted under this Agreement.
+
+6.      Term and Termination.
+
+The license and service term are set forth in your Entitlement(s). Your
+rights under this Agreement will terminate immediately without notice
+from Sun if you materially breach it or take any action in derogation
+of Sun's and/or its licensors' rights to Software. Sun may terminate
+this Agreement should any Software become, or in Sun's reasonable
+opinion likely to become, the subject of a claim of intellectual
+property infringement or trade secret misappropriation. Upon
+termination, you will cease use of, and destroy, Software and confirm
+compliance in writing to Sun. Sections 1, 5, 6, 7, and 9-15 will
+survive termination of the Agreement.
+
+7.      Java Compatibility and Open Source.
+
+Software may contain Java technology. You may not create additional
+classes to, or modifications of, the Java technology, except under
+compatibility requirements available under a separate agreement
+available at www.java.net.
+
+Sun supports and benefits from the global community of open source
+developers, and thanks the community for its important contributions
+and open standards-based technology, which Sun has adopted into many of
+its products.
+
+Please note that portions of Software may be provided with notices and
+open source licenses from such communities and third parties that
+govern the use of those portions, and any licenses granted hereunder do
+not alter any rights and obligations you may have under such open
+source licenses, however, the disclaimer of warranty and limitation of
+liability provisions in this Agreement will apply to all Software in
+this distribution.
+
+8.      Limited Warranty.
+
+Sun warrants to you that for a period of 90 days from the date of
+purchase, as evidenced by a copy of the receipt, the media on which
+Software is furnished (if any) will be free of defects in materials and
+workmanship under normal use. Except for the foregoing, Software is
+provided &quot;AS IS&quot;. Your exclusive remedy and Sun's entire liability
+under this limited warranty will be at Sun's option to replace Software
+media or refund the fee paid for Software. Some states do not allow
+limitations on certain implied warranties, so the above may not apply
+to you. This limited warranty gives you specific legal rights. You may
+have others, which vary from state to state.
+
+9.      Disclaimer of Warranty.
+
+UNLESS SPECIFIED IN THIS AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS,
+REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT
+ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO
+BE LEGALLY INVALID.
+
+10.     Limitation of Liability.
+
+TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS
+LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES,
+HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR
+RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
+BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will Sun's
+liability to you, whether in contract, tort (including negligence), or
+otherwise, exceed the amount paid by you for Software under this
+Agreement. The foregoing limitations will apply even if the above
+stated warranty fails of its essential purpose. Some states do not
+allow the exclusion of incidental or consequential damages, so some of
+the terms above may not be applicable to you.
+
+11.     Export Regulations.
+
+All Software, documents, technical data, and any other materials
+delivered under this Agreement are subject to U.S. export control laws
+and may be subject to export or import regulations in other countries.
+You agree to comply strictly with these laws and regulations and
+acknowledge that you have the responsibility to obtain any licenses to
+export, re-export, or import as may be required after delivery to you.
+
+12.     U.S. Government Restricted Rights.
+
+If Software is being acquired by or on behalf of the U.S. Government or
+by a U.S. Government prime contractor or subcontractor (at any tier),
+then the Government's rights in Software and accompanying documentation
+will be only as set forth in this Agreement; this is in accordance with
+48 CFR 227.7201 through 227.7202-4 (for Department of Defense (DOD)
+acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD
+acquisitions).
+
+13.     Governing Law.
+
+Any action related to this Agreement will be governed by California law
+and controlling U.S. federal law. No choice of law rules of any
+jurisdiction will apply.
+
+14.     Severability.
+
+If any provision of this Agreement is held to be unenforceable, this
+Agreement will remain in effect with the provision omitted, unless
+omission would frustrate the intent of the parties, in which case this
+Agreement will immediately terminate.
+
+15.     Integration.
+
+This Agreement, including any terms contained in your Entitlement, is
+the entire agreement between you and Sun relating to its subject
+matter. It supersedes all prior or contemporaneous oral or written
+communications, proposals, representations and warranties and prevails
+over any conflicting or additional terms of any quote, order,
+acknowledgment, or other communication between the parties relating to
+its subject matter during the term of this Agreement. No modification
+of this Agreement will be binding, unless in writing and signed by an
+authorized representative of each party.
+
+Please contact Sun Microsystems, Inc. 4150 Network Circle, Santa Clara,
+California 95054 if you have questions.
+</diff>
      <filename>OtherLicensedWorks.txt</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,8 @@ object RequestState {
     val path = uri.split(&quot;/&quot;).toList.filter{n =&gt; n != null &amp;&amp; n.length &gt; 0}
     
     new RequestState(paramNames, params,uri,path,contextPath, RequestType(request),/* resourceFinder,*/
-        path.take(1) match {case List(&quot;rest&quot;) | List(&quot;soap&quot;) =&gt; true; case _ =&gt; false})
+        path.take(1) match {case List(&quot;rest&quot;) | List(&quot;soap&quot;) =&gt; true; case _ =&gt; false},
+        readWholeStream(request.getInputStream))
   }
 }
 
@@ -37,7 +38,8 @@ class RequestState(val paramNames: List[String],val params: Map[String, List[Str
     val contextPath: String,
     val requestType: RequestType,
     /*val resourceFinder: (String) =&gt;  InputStream,*/
-    val webServices_? : boolean) {
+    val webServices_? : boolean,
+        val body: Array[byte]) {
   
   val section = path(0) match {case null =&gt; &quot;default&quot;; case s =&gt; s}
   val view = path(1) match {case null =&gt; &quot;index&quot;; case s @ _ =&gt; s}</diff>
      <filename>lift/src/main/scala/net/liftweb/http/RequestState.scala</filename>
    </modified>
    <modified>
      <diff>@@ -46,6 +46,11 @@ trait MappedField[T &lt;: Any,O&lt;:Mapper[O]] {
     v
   }
   
+  def :?=(v: Option[T]) : Option[T] = {
+    v.foreach(tv =&gt; this := tv)
+    v
+  }
+  
   /**
    * Assignment from the underlying type.  It's ugly, but:&lt;br /&gt;
    * field() = new_value &lt;br /&gt;
@@ -95,6 +100,11 @@ trait MappedField[T &lt;: Any,O&lt;:Mapper[O]] {
     if (safe_? || writePermission_?) i_set_!(value)
     else throw new Exception(&quot;Do not have permissions to set this field&quot;)
   }
+
+  def set_?(value: Option[T]): Option[T] = {
+    value.foreach(v =&gt; this.set(v))
+    value
+  }
   
   protected def i_set_!(value : T) : T
   </diff>
      <filename>lift/src/main/scala/net/liftweb/mapper/MappedField.scala</filename>
    </modified>
    <modified>
      <diff>@@ -65,7 +65,7 @@ trait MetaMapper[A&lt;:Mapper[A]] extends Mapper[A] {
   
   def count(by: QueryParam[A]*): long = {
     val bl = by.toList
-    val query = addOrdering(addFields(&quot;SELECT COUNT(*) FROM &quot;+tableName_$+&quot;  &quot;, false, bl), bl)
+    val query = addEndStuffs(addFields(&quot;SELECT COUNT(*) FROM &quot;+tableName_$+&quot;  &quot;, false, bl), bl)
 
     DB.prepareStatement(query) {
       st =&gt;
@@ -80,7 +80,7 @@ trait MetaMapper[A&lt;:Mapper[A]] extends Mapper[A] {
   
   def findAll(by: QueryParam[A]*): List[A] = {
     val bl = by.toList
-    val query = addOrdering(addFields(&quot;SELECT * FROM &quot;+tableName_$+&quot;  &quot;, false, bl), bl)
+    val query = addEndStuffs(addFields(&quot;SELECT * FROM &quot;+tableName_$+&quot;  &quot;, false, bl), bl)
     DB.prepareStatement(query) {
       st =&gt;
         setStatementFields(st, bl, 1)
@@ -153,15 +153,29 @@ trait MetaMapper[A&lt;:Mapper[A]] extends Mapper[A] {
   
   // def find(by: QueryParam): Option[A] = find(List(by))
   
-  def addOrdering(in: String, params: List[QueryParam[A]]): String = {
+  private def _addOrdering(in: String, params: List[QueryParam[A]]): String = {
     val lst = params.flatMap{p =&gt; p match {case OrderBy(field, ascending) =&gt; List(field.name+&quot; &quot;+(if (ascending) &quot;ASC&quot; else &quot;DESC&quot;)); case _ =&gt; Nil}} 
     if (lst.length == 0) in
     else in+&quot; ORDER BY &quot;+lst.mkString(&quot;&quot;, &quot; , &quot;, &quot;&quot;)
   }
   
+  def addEndStuffs(in: String, params: List[QueryParam[A]]): String = {
+    val tmp = _addOrdering(in, params)
+    val max = params.foldRight(None.asInstanceOf[Option[long]]){a,b =&gt; a match {case MaxRows(n) =&gt; Some(n); case _ =&gt; b}}
+    val start = params.foldRight(None.asInstanceOf[Option[long]]){a,b =&gt; a match {case StartAt(n) =&gt; Some(n); case _ =&gt; b}}
+
+    if (max.isDefined &amp;&amp; start.isDefined) {
+      tmp + &quot; LIMIT &quot;+start.get+&quot;,&quot;+max.get
+    } else if (max.isDefined) {
+      tmp + &quot; LIMIT &quot;+max.get
+    } else if (start.isDefined) {
+      tmp + &quot; LIMIT &quot;+start.get+&quot;,&quot;+java.lang.Long.MAX_VALUE
+    } else tmp
+  }
+  
   def find(by: QueryParam[A]*): Option[A] = {
     val bl = by.toList
-    val query = addOrdering(addFields(&quot;SELECT * FROM &quot;+tableName_$+&quot; &quot;,false,  bl), bl)
+    val query = addEndStuffs(addFields(&quot;SELECT * FROM &quot;+tableName_$+&quot; &quot;,false,  bl), bl)
     DB.prepareStatement(query) {
       st =&gt;
         setStatementFields(st, bl, 1)
@@ -632,4 +646,5 @@ abstract class QueryParam[O&lt;:Mapper[O]]
 case class ByField[O&lt;:Mapper[O], T](field: MappedField[T,O], value: T) extends QueryParam[O]
 case class OrderBy[O&lt;:Mapper[O], T](field: MappedField[T,O],ascending: boolean) extends QueryParam[O]
 case class BySql[O&lt;:Mapper[O]](query: String, params: Any*) extends QueryParam[O]
-                                                              
\ No newline at end of file
+case class MaxRows[O&lt;:Mapper[O]](max: long) extends QueryParam[O]
+case class StartAt[O&lt;:Mapper[O]](start: long) extends QueryParam[O]</diff>
      <filename>lift/src/main/scala/net/liftweb/mapper/MetaMapper.scala</filename>
    </modified>
    <modified>
      <diff>@@ -61,7 +61,7 @@ class MappedDateTime[T&lt;:Mapper[T]](val owner : T) extends MappedField[Date, T] {
   
   def buildSetActualValue(accessor : Method, inst : AnyRef, columnName : String) : (T, AnyRef) =&gt; unit = {
     inst match {
-      case null =&gt; {(inst : T, v : AnyRef) =&gt; {val tv = getField(inst, accessor); tv.set(null); tv.resetDirty}}
+      case null =&gt; {(inst : T, v : AnyRef) =&gt; {val tv = getField(inst, accessor); tv.set(null.asInstanceOf[java.util.Date]); tv.resetDirty}}
       case d : java.util.Date =&gt; {(inst : T, v : AnyRef) =&gt; {val tv = getField(inst, accessor); tv.set(v.asInstanceOf[Date]); tv.resetDirty}}
       case d : java.sql.Date =&gt; {(inst : T, v : AnyRef) =&gt; {val tv = getField(inst, accessor); tv.set(new Date(v.asInstanceOf[java.sql.Date].getTime)); tv.resetDirty}}
       case _ =&gt; {(inst : T, v : AnyRef) =&gt; {val tv = getField(inst, accessor); tv.set(toDate(v)); tv.resetDirty}}</diff>
      <filename>lift/src/main/scala/net/liftweb/proto/MappedDateTime.scala</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@ package net.liftweb.util
 
 import java.net.{URLDecoder, URLEncoder}
 import scala.collection.mutable.{HashSet}
-import scala.xml.{NodeSeq, Elem}
+import scala.xml.{NodeSeq, Elem, Node}
 import scala.collection.{Map}
 import scala.collection.mutable.HashMap
 import java.lang.reflect.{Method, Modifier, InvocationTargetException}
@@ -18,6 +18,8 @@ import java.lang.reflect.Modifier
 import org.apache.commons.codec.binary.Base64
 import java.io.{InputStream, ByteArrayOutputStream, ByteArrayInputStream}
 import java.security.{SecureRandom, MessageDigest}
+import javax.mail._
+
 
 /**
  *  A bunch of helper functions
@@ -500,6 +502,10 @@ object Helpers {
     new String((new Base64).encode(in))
   }
   
+  def base64Decode(in: String): Array[byte] = {
+    (new Base64).decode(in.getBytes(&quot;UTF-8&quot;))
+  }
+  
   def toByteArrayInputStream(in: InputStream) = {
     val ba = new Array[byte](4096)
     val bos = new ByteArrayOutputStream
@@ -567,4 +573,24 @@ object Helpers {
     addDigit(in, 0, len, sb)
     sb.toString
   }
+  
+  def sendMail(from: String, to: List[String], subject: String,cc: List[String], body: Map[String, Array[byte]]): boolean = {
+    false
+  }
+  
+  implicit def nodeSeqToOptionString(in: NodeSeq): Option[String] = if (in.length == 0) None else Some(in.text)
+  
+  def readWholeStream(in: InputStream): Array[byte] = {
+    val bos = new ByteArrayOutputStream
+    val ba = new Array[byte](4096)
+    
+    def readOnce {
+      val len = in.read(ba)
+      if (len &lt; 0) return
+      if (len &gt; 0) bos.write(ba, 0, len)
+      readOnce
+    }
+    
+    bos.toByteArray
+  }
 }</diff>
      <filename>lift/src/main/scala/net/liftweb/util/Helpers.scala</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b475828a8d3543b628e8e1029ff581351f4cf0d3</id>
    </parent>
  </parents>
  <author>
    <name>pollak</name>
    <email>pollak@a1e4567e-5129-0410-9a71-e7582cf7e72e</email>
  </author>
  <url>http://github.com/ymnk/liftweb/commit/5d60cf0ec331c50849829e4365cf489d1df9afdd</url>
  <id>5d60cf0ec331c50849829e4365cf489d1df9afdd</id>
  <committed-date>2007-03-02T21:51:16-08:00</committed-date>
  <authored-date>2007-03-02T21:51:16-08:00</authored-date>
  <message>Added &quot;mail&quot; features

Added setting fields with Option[T]

Misc updated to Helpers


git-svn-id: https://liftweb.googlecode.com/svn/trunk/liftweb@22 a1e4567e-5129-0410-9a71-e7582cf7e72e</message>
  <tree>baee899d79f20d5be130a80d8fddd016f9ce62e8</tree>
  <committer>
    <name>pollak</name>
    <email>pollak@a1e4567e-5129-0410-9a71-e7582cf7e72e</email>
  </committer>
</commit>
