当前注册人数423093人 邮箱: 密码: 注册新用户 忘记密码
首页 C/C++/MFC C# ASP.NET VB.NET MATLAB Android   站内搜索 下载代码说明/积分规则
为什么要注册?

1. 可以直接免费从本站下载代码,防止邮件发送不到您的邮箱,或登录不了国外网站

2. 可以设定关键字,当有您关心的代码收录时,邮件通知您

3. 对这里的代码进行评分和评论

4. 可以和大家一起分享你的源代码,得到更多的建议

SuperMail.NET, a bulk emailing app using System.Net.Mail, MS Access, and My.Settings

VB.NET实现的邮件群发源代码

2008年01月24日
VB, VB 8.0, Windows, .NET, .NET 2.0, VS, VS2005, Dev
这是一个VB.NET开发的应用程序,使用到了 System.Net.Mail, MS Access,和My.Settings实现邮件群发功能。邮件列表从Access数据库中读取,可以单人发送,也可以多人发送。支持HTML格式的邮件正文。
相关知识
' Sub to send the email(s)

Private Sub SendEmail( _
ByVal emailAddress As String, _
ByVal name As String)

' start showing wait cursor while email(s) are being sent

Me.Cursor = Cursors.WaitCursor
'scrape site and incert strRecName

Dim strMailBody As String = ScreenScrapeHtml(CStr(cbSelectEmail.Text))
strMailBody = strMailBody.Replace("SoNso", name)
'create the mail message

Dim mail As New System.Net.Mail.MailMessage()
'set the addresses

mail.From = New System.Net.Mail.MailAddress(my.Settings.EmailAccount)
mail.To.Add(emailAddress)
'set the content

mail.IsBodyHtml = True
mail.Subject = CStr(cbEmailSubject.Text)
mail.Body = strMailBody
'send the message(s)

Dim smtp As New System.Net.Mail.SmtpClient(CStr(My.Settings.SMPT))
'Set the port number to use

smtp.Port = My.Settings.Port
'Set credentials if checked

If My.Settings.UseAuthentication = True Then
smtp.Credentials = New System.Net.NetworkCredential( _
My.Settings.UserName, My.Settings.Password)
End If
'enable ssl if checked

If My.Settings.SSL = True Then
smtp.EnableSsl = True
End If
' send 

smtp.Send(mail)
' Stop wait cursor

Me.Cursor = Cursors.Arrow
End Sub
源代码原文下载:
SuperMail.NET, a bulk emailing app using System.Net.Mail, MS Access, and My.Settings Using the System.Net.Mail NameSpace, My.Settings, and MS Access To Develop a Bulk Emailing Applications. What SuperMail.NET does is allow you to store your newsletters or HTML emails on your web server in the form of .htm files and then scrape the html replacing any specified text (the recipient name, date, ect..) and then send them out to a list you import into the Access database using field mapping.

源码图片

点击链接查看大图
从本站下载附件及源代码(1个附件,已经成功下载848次)

最值得关注的外文源代码

SuperMail.NET, a bulk emailing app using System.Net.Mail, MS Access, and My.Settings
A simple way to snap a form to screen borders
Basics of Tetris in VB.NET 2005
An Email Server Source Code With SMTP POP3 Support
评论(评论是增加积分的一个有效途径)
字数在300字内
请如实评论
本源代码共评论66次,此处显示最近20次评论! 查看所有评论

夕见  2016年12月14日
不错啊
晓辰  2015年01月23日
nideke  2014年08月24日
学习用
tystq  2013年06月18日
只能发,不能收,要是能收就好了
eviews  2013年02月04日
这款代码不错,要是用txt存储电子邮件地址就更好了!
samsparty  2012年04月27日
使用性很强啊,赞一个。
WJ_LEE  2012年03月18日
好东西
suiyidodo  2012年02月14日
谢谢
saaf  2012年01月25日
学习学习
ly_lhp  2012年01月21日
学习
情缘  2011年12月24日
呵呵呵
surfingpan  2011年12月19日
吼吼
surfingpan  2011年12月12日
顶起
jdtx2011  2011年11月30日
很好。。。谢谢。。。
gm  2011年10月11日
很有用
gm  2011年10月10日
实用性高
ChillyRain  2011年06月27日
挺好的!赞一个!
静水流深  2010年12月22日
谢谢
WILL  2010年12月22日
谢谢
祈离  2010年09月25日
下载了,在研究中......
字数在300字内
请如实评论
200万国内源码搜索
CopyRight (C) codesoso.com 2007-2009 All Rights Reserved zhihuishi   免责声明