1 // MailMessageWrapper.cs
2 // author: Per Arneng <pt99par@student.bth.se>
4 using System.Collections;
7 namespace System.Web.Mail {
9 internal class MailMessageWrapper {
11 private MailAddressCollection bcc = new MailAddressCollection();
12 private MailAddressCollection cc = new MailAddressCollection();
13 private MailAddress from;
14 private MailAddressCollection to = new MailAddressCollection();
15 private MailMessage message;
18 public MailMessageWrapper( MailMessage message )
20 this.message = message;
22 if(message.From != null ) from = MailAddress.Parse( message.From );
23 if(message.To != null ) to = MailAddressCollection.Parse( message.To );
24 if(message.Cc != null )cc = MailAddressCollection.Parse( message.Cc );
25 if(message.Bcc != null )bcc = MailAddressCollection.Parse( message.Bcc );
29 public IList Attachments {
30 get { return message.Attachments; }
33 public MailAddressCollection Bcc {
38 get { return message.Body; }
39 set { message.Body = value; }
42 public Encoding BodyEncoding {
43 get { return message.BodyEncoding; }
44 set { message.BodyEncoding = value; }
47 public MailFormat BodyFormat {
48 get { return message.BodyFormat; }
49 set { message.BodyFormat = value; }
52 public MailAddressCollection Cc {
56 public MailAddress From {
60 public IDictionary Headers {
61 get { return message.Headers; }
64 public MailPriority Priority {
65 get { return message.Priority; }
66 set { message.Priority = value; }
69 public string Subject {
70 get { return message.Subject; }
71 set { message.Subject = value; }
74 public MailAddressCollection To {
78 public string UrlContentBase {
79 get { return message.UrlContentBase; }
83 public string UrlContentLocation {
84 get { return message.UrlContentLocation; }