diff options
author | Sanja Gupta <sanjay@mono-cvs.ximian.com> | 2004-08-30 14:44:48 +0400 |
---|---|---|
committer | Sanja Gupta <sanjay@mono-cvs.ximian.com> | 2004-08-30 14:44:48 +0400 |
commit | 5c3379c1f36d55243053afb8cf89d1f1b18bccbb (patch) | |
tree | b30a9002c401a8980c44ae0a373b2a373dc53447 /mcs/class/System.Web | |
parent | 4854859bf123749eda01c2bda7d2cf79d2d86f62 (diff) |
ChangeLog: Updated ChangeLog
MailMessage.cs:
MailMessageWrapper.cs:
SmtpClient.cs: Fields property of MailMessage from .Net 1.1 was not
handled completely.
svn path=/branches/mono-1-0/mcs/; revision=33033
Diffstat (limited to 'mcs/class/System.Web')
4 files changed, 30 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web.Mail/ChangeLog b/mcs/class/System.Web/System.Web.Mail/ChangeLog index 4ac2bcc035e..ff65aaa23c4 100644 --- a/mcs/class/System.Web/System.Web.Mail/ChangeLog +++ b/mcs/class/System.Web/System.Web.Mail/ChangeLog @@ -1,3 +1,10 @@ +2004-08-30 Sanjay Gupta <gsanjay@novell.com> + + * MailMessage.cs: + * MailMessageWrapper.cs: + * SmtpClient.cs: Fields property of MailMessage from .Net 1.1 was not + handled completely. + 2004-08-10 Gonzalo Paniagua Javier <gonzalo@ximian.com> * SmtpClient.cs: multipart mails default body format is now the same as diff --git a/mcs/class/System.Web/System.Web.Mail/MailMessage.cs b/mcs/class/System.Web/System.Web.Mail/MailMessage.cs index 6531a6d6156..fea1d167846 100644 --- a/mcs/class/System.Web/System.Web.Mail/MailMessage.cs +++ b/mcs/class/System.Web/System.Web.Mail/MailMessage.cs @@ -51,7 +51,6 @@ namespace System.Web.Mail private string to;
private string urlContentBase;
private string urlContentLocation; - private Hashtable fields;
// Constructor
public MailMessage ()
@@ -59,7 +58,9 @@ namespace System.Web.Mail attachments = new ArrayList (8);
headers = new ListDictionary ();
bodyEncoding = Encoding.Default; +#if NET_1_1 fields = new Hashtable ();
+#endif }
// Properties
@@ -127,6 +128,8 @@ namespace System.Web.Mail }
#if NET_1_1
+ private Hashtable fields;
+ public IDictionary Fields {
get { return (IDictionary) fields; diff --git a/mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs b/mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs index 17bd581675b..270892aab93 100644 --- a/mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs +++ b/mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs @@ -227,6 +227,19 @@ namespace System.Web.Mail { public string UrlContentLocation { get { return message.UrlContentLocation; } } + +#if NET_1_1 + public MailHeader Fields { + get { + MailHeader bodyHeaders = new MailHeader(); + // Add Fields to MailHeader Object + foreach( string key in message.Fields.Keys ) + bodyHeaders.Data[ key ] = (string)this.message.Fields[ key ]; + return bodyHeaders; + } + } +#endif + } } diff --git a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs index 109f1cf60a8..d77652c1384 100644 --- a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs +++ b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs @@ -153,6 +153,12 @@ namespace System.Web.Mail { MailHeader partHeader = new MailHeader(); partHeader.ContentType = bodyContentType; + +#if NET_1_1 + // Add all the custom headers to body part as specified in + //Fields property of MailMessageWrapper + partHeader.Data.Add(msg.Fields.Data); +#endif smtp.WriteHeader( partHeader ); |