2 // System.Web.Mail.MailMessage.cs
\r
5 // Lawrence Pit (loz@cable.a2000.nl)
\r
6 // Per Arneng (pt99par@student.bth.se)
\r
7 // Sanjay Gupta (gsanjay@novell.com)
9 // (c)2004 Novell, Inc. (http://www.novell.com)
13 // Permission is hereby granted, free of charge, to any person obtaining
14 // a copy of this software and associated documentation files (the
15 // "Software"), to deal in the Software without restriction, including
16 // without limitation the rights to use, copy, modify, merge, publish,
17 // distribute, sublicense, and/or sell copies of the Software, and to
18 // permit persons to whom the Software is furnished to do so, subject to
19 // the following conditions:
21 // The above copyright notice and this permission notice shall be
22 // included in all copies or substantial portions of the Software.
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 using System.Collections;
\r
35 using System.Collections.Specialized;
\r
38 namespace System.Web.Mail
\r
42 public class MailMessage
\r
44 private ArrayList attachments;
\r
46 private string body = "";
\r
47 private Encoding bodyEncoding;
\r
48 private MailFormat bodyFormat;
\r
50 private string from;
\r
51 private ListDictionary headers;
\r
52 private MailPriority priority;
\r
53 private string subject = "";
\r
55 private string urlContentBase;
\r
56 private string urlContentLocation;
59 public MailMessage ()
\r
61 attachments = new ArrayList (8);
\r
62 headers = new ListDictionary ();
\r
63 bodyEncoding = Encoding.Default;
65 fields = new Hashtable ();
\r
68 bodyParts = new ArrayList (2);
73 public IList Attachments {
\r
74 get { return (IList) attachments; }
\r
78 get { return bcc; }
\r
79 set { bcc = value; }
\r
82 public string Body {
\r
83 get { return body; }
\r
84 set { body = value; }
\r
87 public Encoding BodyEncoding {
\r
88 get { return bodyEncoding; }
\r
89 set { bodyEncoding = value; }
\r
92 public MailFormat BodyFormat {
\r
93 get { return bodyFormat; }
\r
94 set { bodyFormat = value; }
\r
102 public string From {
\r
103 get { return from; }
\r
104 set { from = value; }
\r
107 public IDictionary Headers {
\r
108 get { return (IDictionary) headers; }
\r
111 public MailPriority Priority {
\r
112 get { return priority; }
\r
113 set { priority = value; }
\r
116 public string Subject {
\r
117 get { return subject; }
\r
118 set { subject = value; }
\r
122 get { return to; }
\r
123 set { to = value; }
\r
126 public string UrlContentBase {
\r
127 get { return urlContentBase; }
\r
128 set { urlContentBase = value; }
\r
131 public string UrlContentLocation {
\r
132 get { return urlContentLocation; }
\r
133 set { urlContentLocation = value; }
\r
137 private Hashtable fields;
\r
139 public IDictionary Fields {
\r
141 return (IDictionary) fields;
147 private ArrayList bodyParts;
149 public IList RelatedBodyParts {
150 get { return (IList) bodyParts; }
156 } //namespace System.Web.Mail
\r