最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
一段VB.NET代码,生成邮件,发送邮件,支持SMTP验证用户名密码.
时间:2022-07-02 11:33:48 编辑:袖梨 来源:一聚教程网
可以生成邮件,可以发送邮件,稍做修改就可以写成一个com组件,在ASP里调用.
以后我会整理成一个完整的.
--------------------------------------------------------------------------------
'-------------------------------------------------
'生成基本邮件格式(包括附件),发送邮件到SMTP服务器,
'只能发送到发件人SMTP服务器(需验证),直接投递功能正在编写。
'
'声明:本段代码中,有一部份借签了网上一位大侠的C#代码.由于找不到原文,无法写出原作者名字
'
'代码编写:头太晕
'QQ:2538288
'MSN:[email protected]
'BLOG: http://spaces.msn.com/members/headfaint http://blog.111com.net/super852
'-------------------------------------------------
Imports System
Imports System.Text
Imports System.IO
Imports System.Net
Imports System.Net.Sockets
Imports System.Collections
Namespace eWebMail
Public Class Mail
'邮件类,生成基本的邮件格式。访问作者BLOG: http://spaces.msn.com/members/headfaint
Public Charset As String = "GB2312"
Public From As String
Public FromName As String
Public ReplyTo As String
Public Subject As String = ""
Public isHtml As Boolean = False
Public Body As String = ""
Public TextBody As String = "This is a HTML mail."
Public RecipientMaxNum As Integer = 15 '最大收件人数 访问作者BLOG: http://spaces.msn.com/members/headfaint
Public Recipient As New ArrayList
以后我会整理成一个完整的.
--------------------------------------------------------------------------------
'-------------------------------------------------
'生成基本邮件格式(包括附件),发送邮件到SMTP服务器,
'只能发送到发件人SMTP服务器(需验证),直接投递功能正在编写。
'
'声明:本段代码中,有一部份借签了网上一位大侠的C#代码.由于找不到原文,无法写出原作者名字
'
'代码编写:头太晕
'QQ:2538288
'MSN:[email protected]
'BLOG: http://spaces.msn.com/members/headfaint http://blog.111com.net/super852
'-------------------------------------------------
Imports System
Imports System.Text
Imports System.IO
Imports System.Net
Imports System.Net.Sockets
Imports System.Collections
Namespace eWebMail
Public Class Mail
'邮件类,生成基本的邮件格式。访问作者BLOG: http://spaces.msn.com/members/headfaint
Public Charset As String = "GB2312"
Public From As String
Public FromName As String
Public ReplyTo As String
Public Subject As String = ""
Public isHtml As Boolean = False
Public Body As String = ""
Public TextBody As String = "This is a HTML mail."
Public RecipientMaxNum As Integer = 15 '最大收件人数 访问作者BLOG: http://spaces.msn.com/members/headfaint
Public Recipient As New ArrayList
相关文章
- 《彩色点点战争》推图常用三大主c玩法详解 01-23
- 《燕云十六声》池鱼林木任务攻略 01-23
- 《大连地铁e出行》查看行程记录方法 01-23
- 《明日方舟》2025春节限定干员余角色介绍 01-23
- 《崩坏:星穹铁道》万敌光锥搭配攻略 01-23
- 《燕云十六声》一药千金任务攻略 01-23