├── .gitignore ├── MailResolve.suo ├── UpgradeLog.XML ├── UpgradeLog.htm ├── MailResolve.v11.suo ├── Readme.md ├── MailResolve ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Program.cs ├── MailResolve.csproj ├── FormResolve.resx ├── FormResolve.cs └── FormResolve.Designer.cs └── MailResolve.sln /.gitignore: -------------------------------------------------------------------------------- 1 | _UpgradeReport_Files/ 2 | Backup/ 3 | MailResolve/bin/ 4 | MailResolve/obj/ -------------------------------------------------------------------------------- /MailResolve.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/MailResolve/master/MailResolve.suo -------------------------------------------------------------------------------- /UpgradeLog.XML: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/MailResolve/master/UpgradeLog.XML -------------------------------------------------------------------------------- /UpgradeLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/MailResolve/master/UpgradeLog.htm -------------------------------------------------------------------------------- /MailResolve.v11.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/MailResolve/master/MailResolve.v11.suo -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # 简单的C# eml 邮件解析 2 | 3 | 简单的操作 4 | 5 | 详见:[https://www.loveyu.org/2493.html](https://www.loveyu.org/2493.html) -------------------------------------------------------------------------------- /MailResolve/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MailResolve/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace MailResolve 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// 应用程序的主入口点。 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new FormSesolve()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /MailResolve.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MailResolve", "MailResolve\MailResolve.csproj", "{2B677D2F-E61E-4236-9AD1-A3A771A2C598}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {2B677D2F-E61E-4236-9AD1-A3A771A2C598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {2B677D2F-E61E-4236-9AD1-A3A771A2C598}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {2B677D2F-E61E-4236-9AD1-A3A771A2C598}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {2B677D2F-E61E-4236-9AD1-A3A771A2C598}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /MailResolve/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.17929 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MailResolve.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /MailResolve/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过下列属性集 6 | // 控制。更改这些属性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("MailResolve")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("hust-wh")] 12 | [assembly: AssemblyProduct("MailResolve")] 13 | [assembly: AssemblyCopyright("Copyright © hust-wh 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 属性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("0336d801-658f-42ee-b087-7f687fbec439")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 内部版本号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MailResolve/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.17929 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MailResolve.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MailResolve.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 使用此强类型资源类,为所有资源查找 51 | /// 重写当前线程的 CurrentUICulture 属性。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /MailResolve/MailResolve.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {2B677D2F-E61E-4236-9AD1-A3A771A2C598} 9 | WinExe 10 | Properties 11 | MailResolve 12 | MailResolve 13 | v3.5 14 | 512 15 | 16 | 17 | 18 | 19 | 3.5 20 | 21 | 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | 30 | 31 | pdbonly 32 | true 33 | bin\Release\ 34 | TRACE 35 | prompt 36 | 4 37 | 38 | 39 | 40 | 41 | 3.5 42 | 43 | 44 | 3.5 45 | 46 | 47 | 3.5 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | Form 58 | 59 | 60 | FormResolve.cs 61 | 62 | 63 | 64 | 65 | FormResolve.cs 66 | 67 | 68 | ResXFileCodeGenerator 69 | Resources.Designer.cs 70 | Designer 71 | 72 | 73 | True 74 | Resources.resx 75 | True 76 | 77 | 78 | SettingsSingleFileGenerator 79 | Settings.Designer.cs 80 | 81 | 82 | True 83 | Settings.settings 84 | True 85 | 86 | 87 | 88 | 95 | -------------------------------------------------------------------------------- /MailResolve/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /MailResolve/FormResolve.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /MailResolve/FormResolve.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using System.Text.RegularExpressions; 10 | using System.IO; 11 | 12 | namespace MailResolve 13 | { 14 | public partial class FormSesolve : Form 15 | { 16 | StreamReader sr; 17 | string MailFlag; 18 | public FormSesolve() 19 | { 20 | InitializeComponent(); 21 | } 22 | 23 | private void buttonResolve_Click(object sender, EventArgs e) 24 | { 25 | textBoxSubject.Text = ""; 26 | textBoxTo.Text = ""; 27 | textBoxFrom.Text = ""; 28 | textBoxCc.Text = ""; 29 | richTextBoxContent.Text = ""; 30 | richTextBoxAtt.Text = ""; 31 | 32 | //创建字符串输入流 33 | sr = new StreamReader(GenerateStreamFromString(richTextBoxMail.Text)); 34 | 35 | string str; 36 | int i; 37 | while (sr.EndOfStream == false) 38 | { 39 | str = sr.ReadLine(); 40 | if ((i = str.IndexOf("Subject:")) == 0) 41 | { 42 | //修改标题 43 | textBoxSubject.Text = Conv(str.Substring(8)); 44 | continue; 45 | } 46 | if ((i = str.IndexOf("From:")) == 0) 47 | { 48 | //修改发件人,存在一个如果发件人为多行会导致显示不全,没有进行相应的处理 49 | textBoxFrom.Text = Conv(str.Substring(5)); 50 | continue; 51 | } 52 | if ((i = str.IndexOf("To:")) == 0) 53 | { 54 | //此处收件人地址和发件人存在相同问题 55 | textBoxTo.Text = Conv(str.Substring(3)); 56 | continue; 57 | } 58 | if ((i = str.IndexOf("Cc:")) == 0) 59 | { 60 | //提取抄送地址,问题一样 61 | textBoxCc.Text = Conv(str.Substring(3)); 62 | continue; 63 | } 64 | if ((i = str.IndexOf("Bcc:")) == 0) 65 | { 66 | //密抄地址,问题一样 67 | textBoxBcc.Text = Conv(str.Substring(4)); 68 | continue; 69 | } 70 | if ((i = str.IndexOf("Content-Type:")) == 0) 71 | { 72 | //如果存在类型标示 73 | 74 | string[] type = GetContentType(str); 75 | //获取类型标示,type[0]标示类型如text、application、multipart 76 | //type[1] 仅对text有效、标示具体类型 77 | //type[2] 相应的编码(utf-8等)或者附件名称(有name、filename两种写法导致type[1]不准确) 78 | 79 | //Console.WriteLine(type[0]+" "+type[1]+" "+type[2]); 80 | if (type[0] == "text") 81 | { 82 | string s = ""; 83 | switch (GetEncoding()) 84 | { 85 | //获取对应的文本处理方式 返回小写字符 86 | 87 | case "base64": 88 | s = Encoding.GetEncoding(type[2].ToUpper()).GetString(Convert.FromBase64String(GetContent())); 89 | break; 90 | case "quoted-printable": 91 | s = QPUnEncryCode(GetContent(), type[2]); 92 | break; 93 | default: 94 | s = GetContent().Trim();//啥都没有直接删除前后的空白 95 | break; 96 | } 97 | if (type[1] == "html") 98 | { 99 | //类型为html输出到浏览器控件 100 | webBrowser.DocumentText = s; 101 | } 102 | else 103 | { 104 | //纯文本输出到存文本控件 105 | richTextBoxContent.Text = s; 106 | } 107 | } 108 | else if (type[0] == "multipart") 109 | { 110 | //邮件唯一标示符 111 | //删除 ‘-’在于部分邮件 '-'前后数量不一致,简单删除了全部 112 | MailFlag = type[2].Replace("-", ""); 113 | } 114 | else if (type[0] == "application") 115 | { 116 | //附件的处理 117 | //此处仅仅对名字进行添加 118 | richTextBoxAtt.Text += Conv(type[2]) + "\t"; 119 | SaveFile(Conv(type[2]), GetContent()); 120 | } 121 | continue; 122 | } 123 | } 124 | } 125 | private string GetContent() 126 | { 127 | //获取Conten-Type:获取之后的相应内容 128 | string str; 129 | string rt = ""; 130 | while ((str = sr.ReadLine()) != "") ; //内容会从空行之后开始,读取到空行内容 131 | while (true) 132 | { //开始循环读取内容 133 | str = sr.ReadLine(); 134 | if (str == null) //读取为空 135 | break; 136 | if (MailFlag != null) 137 | { //存在邮件标示的情况,如果不存在会一直读取到邮件结束,PHPMailer就有这样一个问题 138 | 139 | if (str.Replace("-", "").IndexOf(MailFlag) >= 0) //读取到邮件标示符结束 140 | { 141 | break; 142 | } 143 | } 144 | rt += str + "\n"; 145 | } 146 | return rt; 147 | } 148 | private string GetEncoding() 149 | { 150 | //获取下一行的邮件内容编码,如果不在下一行忽略 151 | string s = sr.ReadLine(); 152 | if (s.ToLower().IndexOf("content-transfer-encoding:") != 0) 153 | { 154 | return ""; 155 | } 156 | return s.Split(' ')[1].ToLower().Trim(); 157 | } 158 | private string[] GetContentType(string str) 159 | { 160 | //获取Content-Type属性 161 | //Content-Type: text/plain; charset="gb2312" 162 | //该类型将会返回string[] = {"text","plain","gb2312"} 163 | string[] s, rt, s3; 164 | rt = new string[3]; 165 | if (str.ToLower().IndexOf("charset") < 1 && 166 | str.ToLower().IndexOf("name") < 1 && 167 | str.ToLower().IndexOf("boundary") < 1) 168 | { 169 | //这里只对这三种情况惊喜下一行考虑,其他情况忽略 170 | str += sr.ReadLine(); 171 | } 172 | str = str.Replace("\"", ""); 173 | s = str.Split(';'); 174 | s[0] = s[0].Trim(); 175 | s[1] = s[1].Trim(); 176 | s3 = s[0].Substring(s[0].IndexOf(" ") + 1).Trim().Split('/'); 177 | rt[0] = s3[0]; 178 | rt[1] = s3[1]; 179 | rt[2] = s[1].Substring(s[1].IndexOf("=") + 1).Trim(); 180 | return rt; 181 | } 182 | private Stream GenerateStreamFromString(string s) 183 | { 184 | //根据字符串创建一个文件流 185 | MemoryStream stream = new MemoryStream(); 186 | StreamWriter writer = new StreamWriter(stream); 187 | writer.Write(s); 188 | writer.Flush(); 189 | stream.Position = 0; 190 | return stream; 191 | } 192 | private string Conv(string s) 193 | { 194 | //转换 标题中的 字符 195 | //=?gb2312?B?u9i4tDogu9i4tKO6udjT2tT2vNNXb3JkcHJlc3Ox7cfpvLDQ3rjExL/CvA==?= 196 | 197 | s = s.Trim(); 198 | Regex reg = new Regex(@"=\?(?[\s\S]+)\?="); 199 | MatchCollection matches; 200 | matches = reg.Matches(s); 201 | for (int i = 0; i < matches.Count; i++) 202 | { 203 | s = s.Replace(matches[i].Value, GetConvString(matches[i].Value)); 204 | } 205 | return s; 206 | } 207 | private string GetConvString(string s) 208 | { 209 | //转换相应的编码内容 210 | string[] s2 = s.Split('?'); 211 | if (s2[2].ToLower() == "b") 212 | { 213 | //Base64转换 214 | s = Encoding.GetEncoding(s2[1].ToUpper()).GetString(Convert.FromBase64String(s2[3])); 215 | } 216 | else 217 | { 218 | //quoted-printable 编码转换 219 | s = QPUnEncryCode(s2[3], s2[1]); 220 | } 221 | return s; 222 | } 223 | private string QPUnEncryCode(string source, string coding) 224 | { 225 | //quoted-printable 转换为相应的字符串 226 | //此处为网上的代码,有点小问题,未做深入探索 227 | source = source.Replace("=\r\n", ""); 228 | source = source.Replace("=\n", ""); 229 | int len = source.Length; 230 | string dest = string.Empty; 231 | int i = 0; 232 | while (i < len) 233 | { 234 | string temp = source.Substring(i, 1); 235 | if (temp == "=") 236 | { 237 | try //代码会出去解析异常,对这样问题进行屏蔽,但会导致乱码 238 | { 239 | int code = Convert.ToInt32(source.Substring(i + 1, 2), 16); 240 | if (Convert.ToInt32(code.ToString(), 10) < 127) 241 | { 242 | dest += ((char)code).ToString(); 243 | i = i + 3; 244 | } 245 | else 246 | { 247 | try //这是另一处转换异常 248 | { 249 | dest += Encoding.GetEncoding(coding.ToUpper()).GetString(new byte[] { 250 | Convert.ToByte(source.Substring(i + 1, 2), 16), 251 | Convert.ToByte(source.Substring(i + 4, 2), 16) 252 | }); 253 | } 254 | catch (Exception ex) 255 | { 256 | Console.WriteLine(ex.Message); 257 | } 258 | i = i + 6; 259 | } 260 | } 261 | catch 262 | { 263 | i++; 264 | continue; 265 | } 266 | } 267 | else 268 | { 269 | dest += temp; 270 | i++; 271 | } 272 | } 273 | return dest; 274 | } 275 | private void SaveFile(string file, string content) 276 | { 277 | //将附件写入到文件 278 | FileStream fs = new FileStream(file, FileMode.Create); 279 | byte[] bs = Convert.FromBase64String(content); 280 | fs.Write(bs, 0, bs.Length); 281 | fs.Close(); 282 | } 283 | 284 | private void FormSesolve_Resize(object sender, EventArgs e) 285 | { 286 | //窗口调整 287 | } 288 | } 289 | } 290 | -------------------------------------------------------------------------------- /MailResolve/FormResolve.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MailResolve 2 | { 3 | partial class FormSesolve 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.richTextBoxMail = new System.Windows.Forms.RichTextBox(); 32 | this.buttonResolve = new System.Windows.Forms.Button(); 33 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 34 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 35 | this.textBoxBcc = new System.Windows.Forms.TextBox(); 36 | this.label7 = new System.Windows.Forms.Label(); 37 | this.textBoxCc = new System.Windows.Forms.TextBox(); 38 | this.label4 = new System.Windows.Forms.Label(); 39 | this.textBoxTo = new System.Windows.Forms.TextBox(); 40 | this.label3 = new System.Windows.Forms.Label(); 41 | this.textBoxFrom = new System.Windows.Forms.TextBox(); 42 | this.label2 = new System.Windows.Forms.Label(); 43 | this.textBoxSubject = new System.Windows.Forms.TextBox(); 44 | this.label1 = new System.Windows.Forms.Label(); 45 | this.groupBox3 = new System.Windows.Forms.GroupBox(); 46 | this.webBrowser = new System.Windows.Forms.WebBrowser(); 47 | this.richTextBoxContent = new System.Windows.Forms.RichTextBox(); 48 | this.groupBox4 = new System.Windows.Forms.GroupBox(); 49 | this.richTextBoxAtt = new System.Windows.Forms.RichTextBox(); 50 | this.groupBox1.SuspendLayout(); 51 | this.groupBox2.SuspendLayout(); 52 | this.groupBox3.SuspendLayout(); 53 | this.groupBox4.SuspendLayout(); 54 | this.SuspendLayout(); 55 | // 56 | // richTextBoxMail 57 | // 58 | this.richTextBoxMail.Dock = System.Windows.Forms.DockStyle.Fill; 59 | this.richTextBoxMail.Location = new System.Drawing.Point(3, 44); 60 | this.richTextBoxMail.Name = "richTextBoxMail"; 61 | this.richTextBoxMail.Size = new System.Drawing.Size(321, 567); 62 | this.richTextBoxMail.TabIndex = 0; 63 | this.richTextBoxMail.Text = ""; 64 | // 65 | // buttonResolve 66 | // 67 | this.buttonResolve.Location = new System.Drawing.Point(246, 15); 68 | this.buttonResolve.Name = "buttonResolve"; 69 | this.buttonResolve.Size = new System.Drawing.Size(75, 23); 70 | this.buttonResolve.TabIndex = 1; 71 | this.buttonResolve.Text = "解析"; 72 | this.buttonResolve.UseVisualStyleBackColor = true; 73 | this.buttonResolve.Click += new System.EventHandler(this.buttonResolve_Click); 74 | // 75 | // groupBox1 76 | // 77 | this.groupBox1.Controls.Add(this.buttonResolve); 78 | this.groupBox1.Controls.Add(this.richTextBoxMail); 79 | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Left; 80 | this.groupBox1.Location = new System.Drawing.Point(10, 10); 81 | this.groupBox1.Margin = new System.Windows.Forms.Padding(10); 82 | this.groupBox1.Name = "groupBox1"; 83 | this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 30, 3, 3); 84 | this.groupBox1.Size = new System.Drawing.Size(327, 614); 85 | this.groupBox1.TabIndex = 15; 86 | this.groupBox1.TabStop = false; 87 | this.groupBox1.Text = "原始邮件"; 88 | // 89 | // groupBox2 90 | // 91 | this.groupBox2.Controls.Add(this.textBoxBcc); 92 | this.groupBox2.Controls.Add(this.label7); 93 | this.groupBox2.Controls.Add(this.textBoxCc); 94 | this.groupBox2.Controls.Add(this.label4); 95 | this.groupBox2.Controls.Add(this.textBoxTo); 96 | this.groupBox2.Controls.Add(this.label3); 97 | this.groupBox2.Controls.Add(this.textBoxFrom); 98 | this.groupBox2.Controls.Add(this.label2); 99 | this.groupBox2.Controls.Add(this.textBoxSubject); 100 | this.groupBox2.Controls.Add(this.label1); 101 | this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top; 102 | this.groupBox2.Location = new System.Drawing.Point(337, 10); 103 | this.groupBox2.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); 104 | this.groupBox2.MinimumSize = new System.Drawing.Size(10, 10); 105 | this.groupBox2.Name = "groupBox2"; 106 | this.groupBox2.Size = new System.Drawing.Size(633, 184); 107 | this.groupBox2.TabIndex = 1; 108 | this.groupBox2.TabStop = false; 109 | this.groupBox2.Text = "标头"; 110 | // 111 | // textBoxBcc 112 | // 113 | this.textBoxBcc.Location = new System.Drawing.Point(53, 155); 114 | this.textBoxBcc.Name = "textBoxBcc"; 115 | this.textBoxBcc.Size = new System.Drawing.Size(555, 21); 116 | this.textBoxBcc.TabIndex = 18; 117 | // 118 | // label7 119 | // 120 | this.label7.AutoSize = true; 121 | this.label7.Location = new System.Drawing.Point(18, 158); 122 | this.label7.Name = "label7"; 123 | this.label7.Size = new System.Drawing.Size(29, 12); 124 | this.label7.TabIndex = 16; 125 | this.label7.Text = "密送"; 126 | // 127 | // textBoxCc 128 | // 129 | this.textBoxCc.Location = new System.Drawing.Point(53, 122); 130 | this.textBoxCc.Name = "textBoxCc"; 131 | this.textBoxCc.Size = new System.Drawing.Size(555, 21); 132 | this.textBoxCc.TabIndex = 19; 133 | // 134 | // label4 135 | // 136 | this.label4.AutoSize = true; 137 | this.label4.Location = new System.Drawing.Point(18, 125); 138 | this.label4.Name = "label4"; 139 | this.label4.Size = new System.Drawing.Size(29, 12); 140 | this.label4.TabIndex = 17; 141 | this.label4.Text = "抄送"; 142 | // 143 | // textBoxTo 144 | // 145 | this.textBoxTo.Location = new System.Drawing.Point(53, 86); 146 | this.textBoxTo.Name = "textBoxTo"; 147 | this.textBoxTo.Size = new System.Drawing.Size(555, 21); 148 | this.textBoxTo.TabIndex = 15; 149 | // 150 | // label3 151 | // 152 | this.label3.AutoSize = true; 153 | this.label3.Location = new System.Drawing.Point(8, 89); 154 | this.label3.Name = "label3"; 155 | this.label3.Size = new System.Drawing.Size(41, 12); 156 | this.label3.TabIndex = 14; 157 | this.label3.Text = "收信人"; 158 | // 159 | // textBoxFrom 160 | // 161 | this.textBoxFrom.Location = new System.Drawing.Point(53, 53); 162 | this.textBoxFrom.Name = "textBoxFrom"; 163 | this.textBoxFrom.Size = new System.Drawing.Size(555, 21); 164 | this.textBoxFrom.TabIndex = 13; 165 | // 166 | // label2 167 | // 168 | this.label2.AutoSize = true; 169 | this.label2.Location = new System.Drawing.Point(6, 56); 170 | this.label2.Name = "label2"; 171 | this.label2.Size = new System.Drawing.Size(41, 12); 172 | this.label2.TabIndex = 12; 173 | this.label2.Text = "发信人"; 174 | // 175 | // textBoxSubject 176 | // 177 | this.textBoxSubject.Location = new System.Drawing.Point(53, 18); 178 | this.textBoxSubject.Name = "textBoxSubject"; 179 | this.textBoxSubject.Size = new System.Drawing.Size(555, 21); 180 | this.textBoxSubject.TabIndex = 11; 181 | // 182 | // label1 183 | // 184 | this.label1.AutoSize = true; 185 | this.label1.Location = new System.Drawing.Point(18, 21); 186 | this.label1.Name = "label1"; 187 | this.label1.Size = new System.Drawing.Size(29, 12); 188 | this.label1.TabIndex = 10; 189 | this.label1.Text = "标题"; 190 | // 191 | // groupBox3 192 | // 193 | this.groupBox3.Controls.Add(this.groupBox4); 194 | this.groupBox3.Controls.Add(this.webBrowser); 195 | this.groupBox3.Controls.Add(this.richTextBoxContent); 196 | this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; 197 | this.groupBox3.Location = new System.Drawing.Point(337, 194); 198 | this.groupBox3.Name = "groupBox3"; 199 | this.groupBox3.Size = new System.Drawing.Size(633, 430); 200 | this.groupBox3.TabIndex = 16; 201 | this.groupBox3.TabStop = false; 202 | this.groupBox3.Text = "内容"; 203 | // 204 | // webBrowser 205 | // 206 | this.webBrowser.Dock = System.Windows.Forms.DockStyle.Fill; 207 | this.webBrowser.Location = new System.Drawing.Point(3, 84); 208 | this.webBrowser.MinimumSize = new System.Drawing.Size(20, 20); 209 | this.webBrowser.Name = "webBrowser"; 210 | this.webBrowser.Size = new System.Drawing.Size(627, 343); 211 | this.webBrowser.TabIndex = 15; 212 | // 213 | // richTextBoxContent 214 | // 215 | this.richTextBoxContent.Dock = System.Windows.Forms.DockStyle.Top; 216 | this.richTextBoxContent.Location = new System.Drawing.Point(3, 17); 217 | this.richTextBoxContent.Name = "richTextBoxContent"; 218 | this.richTextBoxContent.Size = new System.Drawing.Size(627, 67); 219 | this.richTextBoxContent.TabIndex = 12; 220 | this.richTextBoxContent.Text = ""; 221 | // 222 | // groupBox4 223 | // 224 | this.groupBox4.Controls.Add(this.richTextBoxAtt); 225 | this.groupBox4.Dock = System.Windows.Forms.DockStyle.Bottom; 226 | this.groupBox4.Location = new System.Drawing.Point(3, 354); 227 | this.groupBox4.Name = "groupBox4"; 228 | this.groupBox4.Size = new System.Drawing.Size(627, 73); 229 | this.groupBox4.TabIndex = 18; 230 | this.groupBox4.TabStop = false; 231 | this.groupBox4.Text = "附件"; 232 | // 233 | // richTextBoxAtt 234 | // 235 | this.richTextBoxAtt.Dock = System.Windows.Forms.DockStyle.Bottom; 236 | this.richTextBoxAtt.Location = new System.Drawing.Point(3, 23); 237 | this.richTextBoxAtt.Name = "richTextBoxAtt"; 238 | this.richTextBoxAtt.Size = new System.Drawing.Size(621, 47); 239 | this.richTextBoxAtt.TabIndex = 14; 240 | this.richTextBoxAtt.Text = ""; 241 | // 242 | // FormSesolve 243 | // 244 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 245 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 246 | this.ClientSize = new System.Drawing.Size(980, 634); 247 | this.Controls.Add(this.groupBox3); 248 | this.Controls.Add(this.groupBox2); 249 | this.Controls.Add(this.groupBox1); 250 | this.Name = "FormSesolve"; 251 | this.Padding = new System.Windows.Forms.Padding(10); 252 | this.Text = "邮件解析"; 253 | this.Resize += new System.EventHandler(this.FormSesolve_Resize); 254 | this.groupBox1.ResumeLayout(false); 255 | this.groupBox2.ResumeLayout(false); 256 | this.groupBox2.PerformLayout(); 257 | this.groupBox3.ResumeLayout(false); 258 | this.groupBox4.ResumeLayout(false); 259 | this.ResumeLayout(false); 260 | 261 | } 262 | 263 | #endregion 264 | 265 | private System.Windows.Forms.RichTextBox richTextBoxMail; 266 | private System.Windows.Forms.Button buttonResolve; 267 | private System.Windows.Forms.GroupBox groupBox1; 268 | private System.Windows.Forms.GroupBox groupBox2; 269 | private System.Windows.Forms.TextBox textBoxBcc; 270 | private System.Windows.Forms.Label label7; 271 | private System.Windows.Forms.TextBox textBoxCc; 272 | private System.Windows.Forms.Label label4; 273 | private System.Windows.Forms.TextBox textBoxTo; 274 | private System.Windows.Forms.Label label3; 275 | private System.Windows.Forms.TextBox textBoxFrom; 276 | private System.Windows.Forms.Label label2; 277 | private System.Windows.Forms.TextBox textBoxSubject; 278 | private System.Windows.Forms.Label label1; 279 | private System.Windows.Forms.GroupBox groupBox3; 280 | private System.Windows.Forms.WebBrowser webBrowser; 281 | private System.Windows.Forms.RichTextBox richTextBoxContent; 282 | private System.Windows.Forms.GroupBox groupBox4; 283 | private System.Windows.Forms.RichTextBox richTextBoxAtt; 284 | } 285 | } 286 | 287 | --------------------------------------------------------------------------------