一聚教程网:一个值得你收藏的教程网站

最新下载

一段VB.NET代码,生成邮件,发送邮件,支持SMTP验证用户名密码.

时间:2008-01-12 00:00:00 编辑:简简单单 来源:转载

可以生成邮件,可以发送邮件,稍做修改就可以写成一个com组件,在ASP里调用.
以后我会整理成一个完整的.
--------------------------------------------------------------------------------
'-------------------------------------------------
'生成基本邮件格式(包括附件),发送邮件到SMTP服务器,
'只能发送到发件人SMTP服务器(需验证),直接投递功能正在编写。
'
'声明:本段代码中,有一部份借签了网上一位大侠的C#代码.由于找不到原文,无法写出原作者名字
'
'代码编写:头太晕
'QQ:2538288
'MSN:qq2538288@hotmail.com
'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

网站留言

热门栏目