2004-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System.Web / System.Web.Mail / MailMessage.cs
1 //\r
2 // System.Web.Mail.MailMessage.cs\r
3 //\r
4 // Author:\r
5 //    Lawrence Pit (loz@cable.a2000.nl)\r
6 //    Per Arneng (pt99par@student.bth.se)\r
7 //\r
8 \r
9 using System;\r
10 using System.Collections;\r
11 using System.Collections.Specialized;\r
12 using System.Text;\r
13 \r
14 namespace System.Web.Mail\r
15 {\r
16         /// <remarks>\r
17         /// </remarks>\r
18         public class MailMessage\r
19         {\r
20                 private ArrayList attachments;\r
21                 private string bcc;\r
22                 private string body = "";\r
23                 private Encoding bodyEncoding;\r
24                 private MailFormat bodyFormat;\r
25                 private string cc;              \r
26                 private string from;\r
27                 private ListDictionary headers;\r
28                 private MailPriority priority;\r
29                 private string subject = "";\r
30                 private string to;\r
31                 private string urlContentBase;\r
32                 private string urlContentLocation;
33                 private Hashtable fields;\r
34                 \r
35                 // Constructor          \r
36                 public MailMessage ()\r
37                 {\r
38                         attachments = new ArrayList (8);\r
39                         headers = new ListDictionary ();\r
40                         bodyEncoding = Encoding.Default;
41                         fields = new Hashtable ();\r
42                 }               \r
43         \r
44                 // Properties\r
45                 public IList Attachments {\r
46                         get { return (IList) attachments; }\r
47                 }               \r
48                 \r
49                 public string Bcc {\r
50                         get { return bcc; } \r
51                         set { bcc = value; }\r
52                 }\r
53         \r
54                 public string Body {\r
55                         get { return body; } \r
56                         set { body = value; }\r
57                 }\r
58 \r
59                 public Encoding BodyEncoding {\r
60                         get { return bodyEncoding; } \r
61                         set { bodyEncoding = value; }\r
62                 }\r
63 \r
64                 public MailFormat BodyFormat {\r
65                         get { return bodyFormat; } \r
66                         set { bodyFormat = value; }\r
67                 }               \r
68 \r
69                 public string Cc {\r
70                         get { return cc; } \r
71                         set { cc = value; }\r
72                 }\r
73 \r
74                 public string From {\r
75                         get { return from; } \r
76                         set { from = value; }\r
77                 }\r
78 \r
79                 public IDictionary Headers {\r
80                         get { return (IDictionary) headers; }\r
81                 }\r
82                 \r
83                 public MailPriority Priority {\r
84                         get { return priority; } \r
85                         set { priority = value; }\r
86                 }\r
87                 \r
88                 public string Subject {\r
89                         get { return subject; } \r
90                         set { subject = value; }\r
91                 }\r
92 \r
93                 public string To {\r
94                         get { return to; }   \r
95                         set { to = value; }\r
96                 }\r
97 \r
98                 public string UrlContentBase {\r
99                         get { return urlContentBase; } \r
100                         set { urlContentBase = value; }\r
101                 }\r
102 \r
103                 public string UrlContentLocation {\r
104                         get { return urlContentLocation; } \r
105                         set { urlContentLocation = value; }\r
106                 }\r
107 \r
108 #if NET_1_1\r
109                 public IDictionary Fields {\r
110                         get {
111                                 return (IDictionary) fields;
112                         }\r
113                 }\r
114 #endif\r
115         }\r
116         \r
117 } //namespace System.Web.Mail\r