封装了一个发邮件的dll,支持附件,HTML
2008-05-27 15:15
309 查看
封装了一个发邮件的dll,支持附件,HTML
vb调用代码:
Private Declare Function SendMail Lib "sMailDll.dll" _
(ByRef mi As MailInfo) As Integer
Private Type MailInfo
strSmtpAddr As String ' smtp服务器地址
strPort As String 'smtp端口
strAccount As String ' 帐号
strPassword As String '密码
strSendfrom As String ' 发送源地址
strSendto As String ' 目地地址
strSenderName As String ' 发送者姓名
strReceiverName As String ' 接收者姓名
strSubject As String ' 邮件主题
strContent As String ' 邮件正文
strAdjunct As String '附件列表 多个附件以","隔开
isHtml As Integer '是否以HTML发送
End Type
Private Sub Command1_Click()
Dim mi As MailInfo
mi.strSmtpAddr = T1.Text ' smtp服务器地址
mi.strPort = T2.Text 'smtp端口
mi.strAccount = T3.Text ' 帐号
mi.strPassword = T4.Text '密码
mi.strSendfrom = T6.Text ' 发送源地址
mi.strSendto = T8.Text ' 目地地址
mi.strSenderName = T5.Text ' 发送者姓名
mi.strReceiverName = T7.Text ' 接收者姓名
mi.strSubject = T9.Text ' 邮件主题
mi.strContent = T11.Text ' 邮件正文
If T10.Text = "" Then
mi.strAdjunct = ""
Else
mi.strAdjunct = T10.Text '附件列表 多个附件以","隔开
End If
mi.isHtml = 1 '是否以HTML发送End With
'mi.strAccount = "123456"
'MsgBox mi.strAdjunct
'Exit Sub
'Dim iSend As Integer
'iSend = SendMail(mi)
If SendMail(mi) = 1 Then
MsgBox "发送成功"
End If
End Sub
sMailDll.rar 下载
vb调用代码:
Private Declare Function SendMail Lib "sMailDll.dll" _
(ByRef mi As MailInfo) As Integer
Private Type MailInfo
strSmtpAddr As String ' smtp服务器地址
strPort As String 'smtp端口
strAccount As String ' 帐号
strPassword As String '密码
strSendfrom As String ' 发送源地址
strSendto As String ' 目地地址
strSenderName As String ' 发送者姓名
strReceiverName As String ' 接收者姓名
strSubject As String ' 邮件主题
strContent As String ' 邮件正文
strAdjunct As String '附件列表 多个附件以","隔开
isHtml As Integer '是否以HTML发送
End Type
Private Sub Command1_Click()
Dim mi As MailInfo
mi.strSmtpAddr = T1.Text ' smtp服务器地址
mi.strPort = T2.Text 'smtp端口
mi.strAccount = T3.Text ' 帐号
mi.strPassword = T4.Text '密码
mi.strSendfrom = T6.Text ' 发送源地址
mi.strSendto = T8.Text ' 目地地址
mi.strSenderName = T5.Text ' 发送者姓名
mi.strReceiverName = T7.Text ' 接收者姓名
mi.strSubject = T9.Text ' 邮件主题
mi.strContent = T11.Text ' 邮件正文
If T10.Text = "" Then
mi.strAdjunct = ""
Else
mi.strAdjunct = T10.Text '附件列表 多个附件以","隔开
End If
mi.isHtml = 1 '是否以HTML发送End With
'mi.strAccount = "123456"
'MsgBox mi.strAdjunct
'Exit Sub
'Dim iSend As Integer
'iSend = SendMail(mi)
If SendMail(mi) = 1 Then
MsgBox "发送成功"
End If
End Sub
sMailDll.rar 下载
相关文章推荐
- 封装了一个发邮件的dll,支持附件,HTML
- 一个发邮件的类,带验证功能,可以发html内容,可以添加附件,并解决附件乱码问题。
- PHP封装的一个支持HTML、JS、PHP重定向的多功能跳转函数
- 一个发邮件的类,带验证功能,可以发html内容,可以添加附件,并解决附件乱码问题。
- 一个发邮件的类,带验证功能,可以发html内容,可以添加附件,并解决附件乱码问题。
- 封装良好的java mail工具,支持附件,群发,抄送,认证,无认证,ssl,html格式
- PHP封装的一个支持HTML、JS、PHP重定向的多功能跳转函数
- 如何通过 ASP 来发送带附件、格式为 HTML 的邮件?下面提供了一个例程.
- 经常使用的一个python logging封装,支持同时向console和文件输出
- FF或将支持返回一个HTML文档对象
- c# 发送email,正文支持html格式,包含附件
- 用Java写的一个发邮件的东东(群发+多附件)[原创]
- 发一个自己封装的Asp Dll文件
- 辩驳一个默认的说法:IE6不支持!important (转http://www.cnblogs.com/lanyueer/archive/2011/03/29/1998398.html)
- 清除Html标记的一个封装函数
- 自已封装了一个极其易用的加密解密类,支持DES、三重DES、Rijndael、RC2、MD5、以及非对称加密算法RSA
- 一个AJAX自动完成功能的js封装源码[支持中文]第1/2页
- Android 一个自动升级的封装库(支持android6.0和7.0的特性)
- 让FreeTextBox(一个HTML编辑器) 支持上传本地图片并插入编辑器中
- 用VB生成DLL封装ASP代码一个例子:连接access数据库等