毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

电子邮件收发系统毕业论文 第11页

更新时间:2010-5-6:  来源:毕业论文
电子邮件收发系统毕业论文 第11页
       int toend = parts[i].IndexOf(">");
                            To = parts[i].Substring(tobegin + 1, toend - tobegin - 1);
                        }
                        catch
                        {
                            int tobegin = parts[i].IndexOf(":");
                            To = parts[i].Substring(tobegin + 1);
                        }
                    }
                    else if (parts[i].IndexOf("Cc:") == 0)
                    {
                        try
                        {
                            int ccbegin = parts[i].IndexOf("<");
                            int ccend = parts[i].IndexOf(">");
                            Cc = parts[i].Substring(ccbegin + 1, ccend - ccbegin - 1);
                        }
                        catch
                        {
                            int ccbegin = parts[i].IndexOf(":");
                            Cc = parts[i].Substring(ccbegin + 1);
                        }
                    }
                    else if (parts[i].IndexOf("Subject:") == 0)
                    {
                        int Subjectbegin = parts[i].IndexOf(":");
                        if (parts[i].Substring(Subjectbegin + 1).Trim("\r\n".ToCharArray()).Trim() != "")
                        {
                            if (parts[i].Substring(Subjectbegin + 1).IndexOf("?=") > 0)
                            {
                                string ZWFormat = parts[i].Substring(Subjectbegin + 1).Remove(parts[i].Substring(Subjectbegin + 1).Length - 3, 2).Remove(1, 2);
                                string[] Subjects = ZWFormat.Split('?');
                                byte[] buff = Convert.FromBase64String(Subjects[2]);
                                Subject = System.Text.Encoding.Default.GetString(buff);
                            }
                            else
                                Subject = parts[i].Substring(Subjectbegin + 1);
                        }
                        else
                            Subject = "[无主题]";
                    }
                    else if (parts[i].IndexOf("Content-Transfer-Encoding: base64") == 0)
                    {
                        i++;
                        while (i < parts.Length && parts[i].IndexOf("----=") < 0)
                        {
                            if (parts[i].IndexOf("X-Priority:") < 0 && parts[i].IndexOf("X-MSMail-Priority:") < 0 && parts[i].IndexOf("X-Mailer:") < 0 && parts[i].IndexOf("X-MimeOLE:") < 0)
                                MailContent += parts[i];
                            i++;
                        }
                        break;
                    }
                }
                byte[] MailcontentB = Convert.FromBase64String(MailContent);
                MailContent = System.Text.Encoding.Default.GetString(MailcontentB);
            }
            catch { }
        }
        private void ParserTextMail(string content)
        {www.wlfree.com
            try
            {
                string[] parts;
                parts = content.Split("\r\n".ToCharArray());
                int i = 0;
                for (i = 0; i < parts.Length; i++)
                {
                    if (parts[i].IndexOf("for <") > 0 && parts[i].IndexOf(">;") > 0 && parts[i].IndexOf("+") > 0)
                    {
                        string[] Dates = parts[i].Trim().Split(';');
                        Date = Dates[1].Trim();
                    }
                    else if (parts[i].IndexOf("From:") == 0)
                    {
                        int frombegin = parts[i].IndexOf(":");
                        From = parts[i].Substring(frombegin + 1).Trim();
                    }
                    else if (parts[i].IndexOf("To:") == 0)
                    {
                        int tobegin = parts[i].IndexOf(":");
                        To = parts[i].Substring(tobegin + 1).Trim();

                    }
                    else if (parts[i].IndexOf("Cc:") == 0

 << 上一页  [11] 

电子邮件收发系统毕业论文 第11页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。