• 大小: 0.13M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-02-24
  • 语言: C#
  • 标签:

资源简介


资源截图

代码片段和文件信息

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.Net;
using System.Net.Mail;
using System.Text.Regularexpressions;

namespace SEmailWithoutAtt
{
    public partial class frmSend : Form
    {
        public frmSend()
        {
            InitializeComponent();
        }
        //对邮件内容进行编码
        private static string base64Encode(string str)
        {
            return Convert.Tobase64String(Encoding.UTF8.GetBytes(str));
        }

        private void SendEmail(MailMessage message)
        {
            message.Subject = base64Encode(txtSubject.Text);    //设置发送邮件的主题
            message.Body = base64Encode(txtContent.Text);       //设置发送邮件的内容
            //实例化SmtpClient邮件发送类对象
            SmtpClient client = new SmtpClient(txtServer.Text Convert.ToInt32(txtPort.Text));
            //设置用于验证发件人身份的凭据
       

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         938  2009-02-10 16:00  sj\01\SEmailWithoutAtt\SEmailWithoutAtt.sln
     文件       30208  2009-02-10 16:04  sj\01\SEmailWithoutAtt\SEmailWithoutAtt.suo
     文件        3120  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\frmSend.cs
     文件       10351  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\frmSend.designer.cs
     文件        5814  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\frmSend.resx
     文件         499  2009-02-10 16:02  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\Program.cs
     文件        3788  2009-02-10 16:01  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\SEmailWithoutAtt.csproj
     文件       12288  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\bin\Debug\SEmailWithoutAtt.exe
     文件       24064  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\bin\Debug\SEmailWithoutAtt.pdb
     文件       14328  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\bin\Debug\SEmailWithoutAtt.vshost.exe
     文件         909  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\obj\Debug\SEmailWithoutAtt.csproj.FileListAbsolute.txt
     文件         849  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\obj\Debug\SEmailWithoutAtt.csproj.GenerateResource.Cache
     文件       12288  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\obj\Debug\SEmailWithoutAtt.exe
     文件         180  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\obj\Debug\SEmailWithoutAtt.frmSend.resources
     文件       24064  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\obj\Debug\SEmailWithoutAtt.pdb
     文件         180  2009-02-10 16:03  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\obj\Debug\SEmailWithoutAtt.Properties.Resources.resources
     文件        1388  2009-02-10 16:00  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\Properties\AssemblyInfo.cs
     文件        2882  2009-02-10 16:00  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\Properties\Resources.Designer.cs
     文件        5612  2009-02-10 16:00  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\Properties\Resources.resx
     文件        1101  2009-02-10 16:00  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\Properties\Settings.Designer.cs
     文件         249  2009-02-10 16:00  sj\01\SEmailWithoutAtt\SEmailWithoutAtt\Properties\Settings.settings
     文件         929  2009-02-10 16:04  sj\02\SEmailWithAtt\SEmailWithAtt.sln
     文件       30720  2009-02-10 16:42  sj\02\SEmailWithAtt\SEmailWithAtt.suo
     文件        4831  2009-02-10 16:05  sj\02\SEmailWithAtt\SEmailWithAtt\frmSend.cs
     文件       12292  2009-02-10 16:05  sj\02\SEmailWithAtt\SEmailWithAtt\frmSend.designer.cs
     文件        6016  2009-02-10 16:05  sj\02\SEmailWithAtt\SEmailWithAtt\frmSend.resx
     文件         496  2009-02-10 16:05  sj\02\SEmailWithAtt\SEmailWithAtt\Program.cs
     文件        3782  2009-02-10 16:05  sj\02\SEmailWithAtt\SEmailWithAtt\SEmailWithAtt.csproj
     文件       14336  2009-02-10 16:05  sj\02\SEmailWithAtt\SEmailWithAtt\bin\Debug\SEmailWithAtt.exe
     文件       26112  2009-02-10 16:05  sj\02\SEmailWithAtt\SEmailWithAtt\bin\Debug\SEmailWithAtt.pdb
     文件       14328  2009-02-10 16:06  sj\02\SEmailWithAtt\SEmailWithAtt\bin\Debug\SEmailWithAtt.vshost.exe
............此处省略33个文件信息

评论

共有 条评论