开发者社区> 轻风有道> 正文

继克仔修改了我的RssReader后,添加了的用mail发送文章的功能!

简介: 修改后的源代码下载:http://files.cnblogs.com/aowind/RssReader2.rar主要添加了一个mail.vb的窗体:源代码如下: Imports System.web.mailPublic Class mailClass mail    Inherits System.Windows.Forms.Form#Region " Windows 窗体设计器生成的代码 "    Public Sub New()Sub New()        MyBase.New()        '该调用是 Windows 窗体设计器所必需的。
+关注继续查看
修改后的源代码下载:
http://files.cnblogs.com/aowind/RssReader2.rar

主要添加了一个mail.vb的窗体:
源代码如下:
img_a6339ee3e57d1d52bc7d02b338e15a60.gifImports System.web.mail
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_405b18b4b6584ae338e0f6ecaf736533.gifimg_1c53668bcee393edac0d7b3b3daff1ae.gif
Public Class mailClass mail
img_33d02437d135341f0800e3d415312ae8.gif    
Inherits System.Windows.Forms.Form
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif#Region 
" Windows 窗体设计器生成的代码 "
img_33d02437d135341f0800e3d415312ae8.gif

img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif
    Public Sub New()Sub New()
img_33d02437d135341f0800e3d415312ae8.gif        
MyBase.New()
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        
'该调用是 Windows 窗体设计器所必需的。
img_33d02437d135341f0800e3d415312ae8.gif
        InitializeComponent()
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        
'在 InitializeComponent() 调用之后添加任何初始化
img_33d02437d135341f0800e3d415312ae8.gif

img_105a1e124122b2abcee4ea8e9f5108f3.gif    
End Sub

img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif    
'窗体重写 dispose 以清理组件列表。
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif
    Protected Overloads Overrides Sub Dispose()Sub Dispose(ByVal disposing As Boolean)
img_33d02437d135341f0800e3d415312ae8.gif        
If disposing Then
img_33d02437d135341f0800e3d415312ae8.gif            
If Not (components Is NothingThen
img_33d02437d135341f0800e3d415312ae8.gif                components.Dispose()
img_33d02437d135341f0800e3d415312ae8.gif            
End If
img_33d02437d135341f0800e3d415312ae8.gif        
End If
img_33d02437d135341f0800e3d415312ae8.gif        
MyBase.Dispose(disposing)
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
End Sub

img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif    
'Windows 窗体设计器所必需的
img_33d02437d135341f0800e3d415312ae8.gif
    Private components As System.ComponentModel.IContainer
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif    
'注意: 以下过程是 Windows 窗体设计器所必需的
img_33d02437d135341f0800e3d415312ae8.gif
    '可以使用 Windows 窗体设计器修改此过程。
img_33d02437d135341f0800e3d415312ae8.gif
    '不要使用代码编辑器修改它。
img_33d02437d135341f0800e3d415312ae8.gif
    Friend WithEvents Label1 As System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents Label2 As System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents Label3 As System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents Label4 As System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents Label5 As System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents Button1 As System.Windows.Forms.Button
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents StatusBar1 As System.Windows.Forms.StatusBar
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif    
Friend WithEvents Label6 As System.Windows.Forms.Label
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()Sub InitializeComponent()
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label1 
= New System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox1 
= New System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label2 
= New System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox2 
= New System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1 
= New System.Windows.Forms.GroupBox
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label3 
= New System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label4 
= New System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label5 
= New System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox3 
= New System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox4 
= New System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox5 
= New System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif        Me.CheckBox1 
= New System.Windows.Forms.CheckBox
img_33d02437d135341f0800e3d415312ae8.gif        Me.Button1 
= New System.Windows.Forms.Button
img_33d02437d135341f0800e3d415312ae8.gif        Me.StatusBar1 
= New System.Windows.Forms.StatusBar
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox6 
= New System.Windows.Forms.TextBox
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label6 
= New System.Windows.Forms.Label
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.SuspendLayout()
img_33d02437d135341f0800e3d415312ae8.gif        Me.SuspendLayout()
img_33d02437d135341f0800e3d415312ae8.gif        
'
img_33d02437d135341f0800e3d415312ae8.gif
        'Label1
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label1.Font = New System.Drawing.Font("宋体"9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134Byte))
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label1.Location 
= New System.Drawing.Point(816)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label1.Name 
= "Label1"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label1.Size = New System.Drawing.Size(5624)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label1.TabIndex 
= 0
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label1.Text 
= "收件人:"
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'TextBox1
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox1.Location = New System.Drawing.Point(8016)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox1.Name 
= "TextBox1"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox1.Size = New System.Drawing.Size(27221)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox1.TabIndex 
= 1
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox1.Text 
= ""
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'Label2
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label2.Font = New System.Drawing.Font("宋体"9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134Byte))
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label2.Location 
= New System.Drawing.Point(880)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label2.Name 
= "Label2"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label2.Size = New System.Drawing.Size(5624)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label2.TabIndex 
= 2
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label2.Text 
= "发信人:"
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'TextBox2
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox2.Location = New System.Drawing.Point(8080)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox2.Name 
= "TextBox2"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox2.Size = New System.Drawing.Size(27221)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox2.TabIndex 
= 3
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox2.Text 
= ""
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'GroupBox1
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.GroupBox1.Controls.Add(Me.CheckBox1)
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.Controls.Add(Me.TextBox5)
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.Controls.Add(Me.TextBox4)
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.Controls.Add(Me.TextBox3)
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.Controls.Add(Me.Label5)
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.Controls.Add(Me.Label4)
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.Controls.Add(Me.Label3)
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.Font 
= New System.Drawing.Font("宋体"9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134Byte))
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.Location 
= New System.Drawing.Point(8120)
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.Name 
= "GroupBox1"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.GroupBox1.Size = New System.Drawing.Size(344128)
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.TabIndex 
= 4
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.TabStop 
= False
img_33d02437d135341f0800e3d415312ae8.gif        Me.GroupBox1.Text 
= "SMTP服务器设置"
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'Label3
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label3.Location = New System.Drawing.Point(1624)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label3.Name 
= "Label3"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label3.Size = New System.Drawing.Size(9616)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label3.TabIndex 
= 0
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label3.Text 
= "SMTP服务器:"
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'Label4
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label4.Location = New System.Drawing.Point(1672)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label4.Name 
= "Label4"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label4.Size = New System.Drawing.Size(9616)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label4.TabIndex 
= 1
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label4.Text 
= "账号:"
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'Label5
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label5.Location = New System.Drawing.Point(1696)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label5.Name 
= "Label5"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label5.Size = New System.Drawing.Size(9616)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label5.TabIndex 
= 2
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label5.Text 
= "密码:"
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'TextBox3
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox3.Location = New System.Drawing.Point(9624)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox3.Name 
= "TextBox3"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox3.Size = New System.Drawing.Size(24021)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox3.TabIndex 
= 3
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox3.Text 
= ""
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'TextBox4
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox4.Location = New System.Drawing.Point(9672)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox4.Name 
= "TextBox4"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox4.Size = New System.Drawing.Size(16821)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox4.TabIndex 
= 4
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox4.Text 
= ""
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'TextBox5
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox5.Location = New System.Drawing.Point(9696)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox5.Name 
= "TextBox5"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox5.Size = New System.Drawing.Size(16821)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox5.TabIndex 
= 5
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox5.Text 
= ""
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'CheckBox1
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.CheckBox1.Location = New System.Drawing.Point(2448)
img_33d02437d135341f0800e3d415312ae8.gif        Me.CheckBox1.Name 
= "CheckBox1"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.CheckBox1.Size = New System.Drawing.Size(20824)
img_33d02437d135341f0800e3d415312ae8.gif        Me.CheckBox1.TabIndex 
= 6
img_33d02437d135341f0800e3d415312ae8.gif        Me.CheckBox1.Text 
= "需要身份验证"
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'Button1
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Button1.Location = New System.Drawing.Point(216248)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Button1.Name 
= "Button1"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Button1.Size = New System.Drawing.Size(12832)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Button1.TabIndex 
= 5
img_33d02437d135341f0800e3d415312ae8.gif        Me.Button1.Text 
= "发送"
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'StatusBar1
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.StatusBar1.Location = New System.Drawing.Point(0292)
img_33d02437d135341f0800e3d415312ae8.gif        Me.StatusBar1.Name 
= "StatusBar1"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.StatusBar1.Size = New System.Drawing.Size(36222)
img_33d02437d135341f0800e3d415312ae8.gif        Me.StatusBar1.TabIndex 
= 6
img_33d02437d135341f0800e3d415312ae8.gif        Me.StatusBar1.Text 
= "StatusBar1"
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'TextBox6
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox6.Location = New System.Drawing.Point(8048)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox6.Name 
= "TextBox6"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.TextBox6.Size = New System.Drawing.Size(27221)
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox6.TabIndex 
= 8
img_33d02437d135341f0800e3d415312ae8.gif        Me.TextBox6.Text 
= ""
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'Label6
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label6.Font = New System.Drawing.Font("宋体"9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134Byte))
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label6.Location 
= New System.Drawing.Point(848)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label6.Name 
= "Label6"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Label6.Size = New System.Drawing.Size(5624)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label6.TabIndex 
= 7
img_33d02437d135341f0800e3d415312ae8.gif        Me.Label6.Text 
= "标题:"
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        'mail
img_33d02437d135341f0800e3d415312ae8.gif
        '
img_33d02437d135341f0800e3d415312ae8.gif
        Me.AutoScaleBaseSize = New System.Drawing.Size(614)
img_33d02437d135341f0800e3d415312ae8.gif        Me.ClientSize 
= New System.Drawing.Size(362314)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Controls.Add(Me.TextBox6)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Controls.Add(Me.Label6)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Controls.Add(Me.StatusBar1)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Controls.Add(Me.Button1)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Controls.Add(Me.GroupBox1)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Controls.Add(Me.TextBox2)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Controls.Add(Me.Label2)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Controls.Add(Me.TextBox1)
img_33d02437d135341f0800e3d415312ae8.gif        Me.Controls.Add(Me.Label1)
img_33d02437d135341f0800e3d415312ae8.gif        Me.FormBorderStyle 
= System.Windows.Forms.FormBorderStyle.FixedToolWindow
img_33d02437d135341f0800e3d415312ae8.gif        Me.Name 
= "mail"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.Text = "SendMail"
img_33d02437d135341f0800e3d415312ae8.gif
        Me.GroupBox1.ResumeLayout(False)
img_33d02437d135341f0800e3d415312ae8.gif        Me.ResumeLayout(
False)
img_33d02437d135341f0800e3d415312ae8.gif
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
End Sub

img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif#
End Region
img_33d02437d135341f0800e3d415312ae8.gif    
Public mail As New MailMessage
img_33d02437d135341f0800e3d415312ae8.gif    
Public body As String
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
Public Sub stand()Sub stand(ByVal sbody As StringByVal title As String)
img_33d02437d135341f0800e3d415312ae8.gif        TextBox6.Text 
= title
img_33d02437d135341f0800e3d415312ae8.gif        body 
= Replace(sbody, "UTF-8""gb2312")
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
End Sub

img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
Private Sub Button1_Click()Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles Button1.Click
img_33d02437d135341f0800e3d415312ae8.gif        
With mail
img_33d02437d135341f0800e3d415312ae8.gif            .
To = TextBox1.Text
img_33d02437d135341f0800e3d415312ae8.gif            .From 
= TextBox2.Text
img_33d02437d135341f0800e3d415312ae8.gif            .Subject 
= TextBox6.Text
img_33d02437d135341f0800e3d415312ae8.gif            .Fields.Add(
"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate""1")
img_33d02437d135341f0800e3d415312ae8.gif            .Fields.Add(
"http://schemas.microsoft.com/cdo/configuration/sendusername", TextBox4.Text)
img_33d02437d135341f0800e3d415312ae8.gif            .Fields.Add(
"http://schemas.microsoft.com/cdo/configuration/sendpassword", TextBox5.Text)
img_33d02437d135341f0800e3d415312ae8.gif            .BodyFormat 
= MailFormat.Html
img_33d02437d135341f0800e3d415312ae8.gif            .Body 
= body
img_33d02437d135341f0800e3d415312ae8.gif        
End With
img_33d02437d135341f0800e3d415312ae8.gif        SmtpMail.SmtpServer 
= TextBox3.Text
img_33d02437d135341f0800e3d415312ae8.gif        SmtpMail.Send(mail)
img_33d02437d135341f0800e3d415312ae8.gif        
MsgBox("发送成功")
img_33d02437d135341f0800e3d415312ae8.gif        
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
End Sub

img_05dd8d549cff04457a6366b0a7c9352a.gif
End Class

img_a6339ee3e57d1d52bc7d02b338e15a60.gif

在菜单内加入“发送文章给朋友”选项,name=FileSendMail, enabled=false
在loadhtml()过程里加上
FileSendMail.Enabled = True

再在主窗体上加上下面事件处理过程
img_405b18b4b6584ae338e0f6ecaf736533.gifimg_1c53668bcee393edac0d7b3b3daff1ae.gif Private Sub FileSendMail_Click()Sub FileSendMail_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles FileSendMail.Click
img_33d02437d135341f0800e3d415312ae8.gif        
Dim smail As New mail
img_33d02437d135341f0800e3d415312ae8.gif        smail.stand(cbii.TopicContents, cbii.TopicTitle)
img_33d02437d135341f0800e3d415312ae8.gif        smail.ShowDialog()
img_33d02437d135341f0800e3d415312ae8.gif
img_05dd8d549cff04457a6366b0a7c9352a.gif    
End Sub

唉!下午公司网络出了问题,去买了一个MODEM,带路由功能,用起来还没有原来的不带路由功能的好用!
浪费了一下午时间,这个功能也就勿勿而就

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
【Web API系列教程】3.9 — 实战:处理数据(添加新条目到数据库)
在本节,你将添加让用户可以创建新book的功能。在app.js中,添加如下代码到视图模型: self.authors = ko.
810 0
使用OpenApi弹性释放和设置云服务器ECS释放
云服务器ECS的一个重要特性就是按需创建资源。您可以在业务高峰期按需弹性的自定义规则进行资源创建,在完成业务计算的时候释放资源。本篇将提供几个Tips帮助您更加容易和自动化的完成云服务器的释放和弹性设置。
18470 0
一起谈.NET技术,VS2010 测试功能之旅:编码的UI测试(4)-通过编写测试代码的方式建立UI测试(上)
  回顾   在之前的入门篇系列中,分别介绍了一个简单的示例, 操作动作的录制原理,通过修改UIMap.UItest文件控制操作动作代码的生成,对象的识别原理。接下来正式进入我们UI测试的进阶篇,在这一章,将讲述如何初步通过自己编写代码的方式来建立UI测试。
740 0
WPF 为资源字典 添加事件响应的后台类
原文:WPF 为资源字典 添加事件响应的后台类 前言,有许多同学在写WPF程序时在资源字典里加入了其它控件,但又想写事件来控制这个控件,但是资源字典没有CS文件,不像窗体XAML还有一个后台的CS文件,怎么办呢? 在工作时也遇到了这个问题,现在把它分享出来 比如说我们现在要写一个TabControl控件,在TabItem中有一个关闭按钮或其它按钮,这个按钮要能响应某个事件。
1180 0
+关注
轻风有道
一年而野,二年而从,三年而通,四年而物,五年而来,六年而鬼入,七年而天成,八年而不知生、不知死
151
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
OceanBase 入门到实战教程
立即下载
阿里云图数据库GDB,加速开启“图智”未来.ppt
立即下载
实时数仓Hologres技术实战一本通2.0版(下)
立即下载