2 // System.Web.Mail.MailMessage.cs
\r
5 // Lawrence Pit (loz@cable.a2000.nl)
\r
6 // Per Arneng (pt99par@student.bth.se)
\r
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 using System.Collections;
\r
32 using System.Collections.Specialized;
\r
35 namespace System.Web.Mail
\r
39 public class MailMessage
\r
41 private ArrayList attachments;
\r
43 private string body = "";
\r
44 private Encoding bodyEncoding;
\r
45 private MailFormat bodyFormat;
\r
47 private string from;
\r
48 private ListDictionary headers;
\r
49 private MailPriority priority;
\r
50 private string subject = "";
\r
52 private string urlContentBase;
\r
53 private string urlContentLocation;
54 private Hashtable fields;
\r
57 public MailMessage ()
\r
59 attachments = new ArrayList (8);
\r
60 headers = new ListDictionary ();
\r
61 bodyEncoding = Encoding.Default;
62 fields = new Hashtable ();
\r
66 public IList Attachments {
\r
67 get { return (IList) attachments; }
\r
71 get { return bcc; }
\r
72 set { bcc = value; }
\r
75 public string Body {
\r
76 get { return body; }
\r
77 set { body = value; }
\r
80 public Encoding BodyEncoding {
\r
81 get { return bodyEncoding; }
\r
82 set { bodyEncoding = value; }
\r
85 public MailFormat BodyFormat {
\r
86 get { return bodyFormat; }
\r
87 set { bodyFormat = value; }
\r
95 public string From {
\r
96 get { return from; }
\r
97 set { from = value; }
\r
100 public IDictionary Headers {
\r
101 get { return (IDictionary) headers; }
\r
104 public MailPriority Priority {
\r
105 get { return priority; }
\r
106 set { priority = value; }
\r
109 public string Subject {
\r
110 get { return subject; }
\r
111 set { subject = value; }
\r
115 get { return to; }
\r
116 set { to = value; }
\r
119 public string UrlContentBase {
\r
120 get { return urlContentBase; }
\r
121 set { urlContentBase = value; }
\r
124 public string UrlContentLocation {
\r
125 get { return urlContentLocation; }
\r
126 set { urlContentLocation = value; }
\r
130 public IDictionary Fields {
\r
132 return (IDictionary) fields;
138 } //namespace System.Web.Mail
\r