资源简介
实现邮件发送,并且带附件
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text.Regularexpressions;
namespace EmailClient
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
MyEmail email;
private void btnSend_Click(object sender EventArgs e)
{
if ((txtTo.Text != ““) && (txtSubject.Text != ““) & (txtContent.Text != ““))
{
email = new MyEmail(txtSubject.Text txtTo.Text txtContent.Text);
email.AddAttchment(txtAttchment.Text);
if (email.SendEmail())
{
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-01-26 17:32 EmailClient\
目录 0 2016-01-26 17:32 EmailClient\EmailClient\
文件 3719 2016-01-07 16:38 EmailClient\EmailClient\EmailClient.csproj
文件 6720 2016-01-07 17:48 EmailClient\EmailClient\Form1.Designer.cs
文件 1889 2016-01-07 17:48 EmailClient\EmailClient\Form1.cs
文件 5817 2016-01-07 17:48 EmailClient\EmailClient\Form1.resx
文件 3046 2016-01-28 18:07 EmailClient\EmailClient\MyEmail.cs
文件 492 2016-01-07 15:45 EmailClient\EmailClient\Program.cs
目录 0 2016-01-26 17:32 EmailClient\EmailClient\Properties\
文件 1354 2016-01-07 15:45 EmailClient\EmailClient\Properties\AssemblyInfo.cs
文件 2872 2016-01-07 15:45 EmailClient\EmailClient\Properties\Resources.Designer.cs
文件 5612 2016-01-07 15:44 EmailClient\EmailClient\Properties\Resources.resx
文件 1096 2016-01-07 15:45 EmailClient\EmailClient\Properties\Settings.Designer.cs
文件 249 2016-01-07 15:44 EmailClient\EmailClient\Properties\Settings.settings
目录 0 2016-01-26 17:32 EmailClient\EmailClient\bin\
目录 0 2016-01-26 17:32 EmailClient\EmailClient\bin\Debug\
文件 12288 2016-02-01 15:12 EmailClient\EmailClient\bin\Debug\EmailClient.exe
文件 34304 2016-02-01 15:12 EmailClient\EmailClient\bin\Debug\EmailClient.pdb
文件 11600 2016-02-01 15:14 EmailClient\EmailClient\bin\Debug\EmailClient.vshost.exe
文件 490 2009-08-31 00:40 EmailClient\EmailClient\bin\Debug\EmailClient.vshost.exe.manifest
目录 0 2016-01-26 17:32 EmailClient\EmailClient\obj\
目录 0 2016-01-26 17:32 EmailClient\EmailClient\obj\x86\
目录 0 2016-02-01 15:12 EmailClient\EmailClient\obj\x86\Debug\
文件 2152 2016-01-07 15:45 EmailClient\EmailClient\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6283 2016-02-01 15:12 EmailClient\EmailClient\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 180 2016-01-28 18:07 EmailClient\EmailClient\obj\x86\Debug\EmailClient.Form1.resources
文件 180 2016-01-28 18:07 EmailClient\EmailClient\obj\x86\Debug\EmailClient.Properties.Resources.resources
文件 1703 2016-02-01 15:14 EmailClient\EmailClient\obj\x86\Debug\EmailClient.csproj.FileListAbsolute.txt
文件 12288 2016-02-01 15:12 EmailClient\EmailClient\obj\x86\Debug\EmailClient.exe
文件 34304 2016-02-01 15:12 EmailClient\EmailClient\obj\x86\Debug\EmailClient.pdb
文件 538 2016-01-28 18:07 EmailClient\EmailClient\obj\x86\Debug\GenerateResource.read.1.tlog
............此处省略5个文件信息
- 上一篇:ASP.NET邮件收发系统
- 下一篇:C# WCF REST调用
评论
共有 条评论