2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / class / System.Web / System.Web.Mail / MailMessage.cs
index b0431b3debec05f7a6def48fa103909e7cd9c00e..cd0eb98f335acffd35fc1271e0376bbb180f0328 100644 (file)
@@ -4,7 +4,31 @@
 // Author:\r
 //    Lawrence Pit (loz@cable.a2000.nl)\r
 //    Per Arneng (pt99par@student.bth.se)\r
+//     Sanjay Gupta (gsanjay@novell.com)
+//
+//     (c)2004 Novell, Inc. (http://www.novell.com)
 //\r
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 \r
 using System;\r
 using System.Collections;\r
@@ -30,7 +54,6 @@ namespace System.Web.Mail
                private string to;\r
                private string urlContentBase;\r
                private string urlContentLocation;
-               private Hashtable fields;\r
                \r
                // Constructor          \r
                public MailMessage ()\r
@@ -38,7 +61,12 @@ namespace System.Web.Mail
                        attachments = new ArrayList (8);\r
                        headers = new ListDictionary ();\r
                        bodyEncoding = Encoding.Default;
+#if NET_1_1
                        fields = new Hashtable ();\r
+#endif
+#if NET_2_0
+                       bodyParts = new ArrayList (2);
+#endif
                }               \r
        \r
                // Properties\r
@@ -106,12 +134,23 @@ namespace System.Web.Mail
                }\r
 \r
 #if NET_1_1\r
+               private Hashtable fields;\r
+               
                public IDictionary Fields {\r
                        get {
                                return (IDictionary) fields;
                        }\r
                }\r
 #endif\r
+
+#if NET_2_0
+               private ArrayList bodyParts;
+               
+               public IList RelatedBodyParts {
+                       get { return (IList) bodyParts; }
+               }
+#endif
+
        }\r
        \r
 } //namespace System.Web.Mail\r