Imports System.Web.mail
SmtpMail.Send("[email protected]","[email protected]","testing Mail!","just sending a test message!")/***************************************
Parameters List:
1. sender
2. receiver
3. title
4. content
SmtpMail.Send("[email protected]","[email protected]","testing Mail!","just sending a test message!")/***************************************
Parameters List:
1. sender
2. receiver
3. title
4. content
解决方案 »
- asp.net动态设置文件上传的路径,怎么处理?
- 大家的提交程序都是采用什么办法来防止群发等广告贴的
- 按回车键带出相关信息(填入文本框内)
- VS2005中GridView排序问题:在调试的时候没问题,但是当我把程序放到服务器上运行的时候,点击表头排序的时候结果全都消失了!
- urlrewrite.net 开源控件在使用时,调试环境和IIS中运行结果不同。
- 在打包asp.net时遇到困难,求救!!因为帖子太长,所以还有代码部分在另一个帖子上(未完)
- 请问“IE Web Controls”是做什么用的,在装一些ASP.net应用程序时要求安装?TKS
- 该页面出现了一个未预料到的错误
- DLL中编辑的效果为什么总是显示不出?
- 问题请教(关于DataRelation)
- 怎样把System.IO.stream转换成字符串?
- 高手们.谁给我一个有关ASP.NET开发的电子书下载的地址啊.顺变再帮我解决一个问题?*^_^*
......
Dim mailObj As New MailMessage()
SmtpMail.SmtpServer = "SmtpServer"
mailObj.From = "[email protected]"
mailObj.To = "[email protected]"
'mailObj.Bcc = ""
'mailObj.Cc = ""
mailObj.Subject = "Test"
mailObj.Body = "Hello"
mailObj.BodyFormat = MailFormat.Html
mailObj.Priority = MailPriority.High
'mailObj.Attachments.Add(New MailAttachment("d:\Green.gif"))
SmtpMail.Send(mailObj)
要加上
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", smtpUserName); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", smtpUserPwd);