Esempio n. 1
0
 private void Initialise()
 {
     this._blindedCarbonCopies              = new EmailAddressCollection();
     this._carbonCopies                     = new EmailAddressCollection();
     this._contentTransferEncoding          = EContentTransferEncoding.SevenBit;
     this._contentType                      = new Net.Common.ContentType();
     this._extraHeaders                     = new ExtraHeadersDictionary();
     this._isDefaultContentTransferEncoding = true;
     this._isDefaultContentType             = true;
     this._keywords = new List <string>();
     this._replyTo  = new EmailAddressCollection();
     this._resentBlindedCarbonCopies = new EmailAddressCollection();
     this._resentCarbonCopies        = new EmailAddressCollection();
     this._resentTo           = new EmailAddressCollection();
     this._comments           = string.Empty;
     this._contentDescription = string.Empty;
     this._contentId          = string.Empty;
     this._inReplyTo          = string.Empty;
     this._messageId          = string.Empty;
     this._received           = string.Empty;
     this._references         = string.Empty;
     this._resentMessageId    = string.Empty;
     this._subject            = string.Empty;
     this._text         = string.Empty;
     this._textEncoding = Encoding.UTF8;
     this._to           = new EmailAddressCollection();
     this._importance   = MailImportance.Normal;
 }
Esempio n. 2
0
        public ExtraHeadersDictionary ParseMIMEXAtribbutes(string text)
        {
            if (text == null)
            {
                throw new ArgumentNullException("text");
            }
            ExtraHeadersDictionary dictionary = new ExtraHeadersDictionary();
            MatchCollection        matchs     = regXAtribbutes.Matches(text);

            for (int i = 0; i < matchs.Count; i++)
            {
                Match match = matchs[i];
                if (match.Groups.Count > 2)
                {
                    dictionary.Add(match.Groups[1].Value, match.Groups[2].Value);
                }
            }
            return(dictionary);
        }